@ship-cli/opencode 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/plugin.ts +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ship-cli/opencode",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Ship - Linear task management integration",
6
6
  "license": "MIT",
package/src/plugin.ts CHANGED
@@ -133,11 +133,13 @@ async function runShip(
133
133
  }
134
134
 
135
135
  /**
136
- * Check if ship is configured in the given directory
136
+ * Check if ship is configured by attempting to run a ship command.
137
+ * This handles both local (.ship/config.yaml) and global configurations.
137
138
  */
138
139
  async function isShipConfigured($: PluginInput["$"]): Promise<boolean> {
139
140
  try {
140
- const result = await $`test -f .ship/config.yaml`.nothrow();
141
+ // Try running ship prime - it will fail if not configured
142
+ const result = await $`ship prime`.nothrow();
141
143
  return result.exitCode === 0;
142
144
  } catch {
143
145
  return false;