@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.
- package/package.json +1 -1
- package/src/plugin.ts +4 -2
package/package.json
CHANGED
package/src/plugin.ts
CHANGED
|
@@ -133,11 +133,13 @@ async function runShip(
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
* Check if ship is configured
|
|
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
|
-
|
|
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;
|