mirror of
https://github.com/tiennm99/ccstatusline.git
synced 2026-10-13 16:14:34 +00:00
Fix bunx availability check on windows (#96)
This commit is contained in:
1 parent
055bf22308
commit
1ad9304039
2 files changed
+5
-3
No files matched your search
+2
-2
@@ -12,7 +12,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"start": "bun run src/ccstatusline.ts",
|
||||
"build": "rm -rf dist/* && bun build src/ccstatusline.ts --target=node --outfile=dist/ccstatusline.js --target-version=14",
|
||||
"build": "rm -rf dist/* ; bun build src/ccstatusline.ts --target=node --outfile=dist/ccstatusline.js --target-version=14",
|
||||
"postbuild": "bun run scripts/replace-version.ts",
|
||||
"example": "cat scripts/payload.example.json | bun start",
|
||||
"prepublishOnly": "bun run build",
|
||||
@@ -70,4 +70,4 @@
|
||||
"patchedDependencies": {
|
||||
"ink@6.2.0": "patches/ink@6.2.0.patch"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,9 @@ export async function isInstalled(): Promise<boolean> {
|
||||
|
||||
export function isBunxAvailable(): boolean {
|
||||
try {
|
||||
execSync('which bunx', { stdio: 'ignore' });
|
||||
// Use platform-appropriate command to check for bunx availability
|
||||
const command = process.platform === 'win32' ? 'where bunx' : 'which bunx';
|
||||
execSync(command, { stdio: 'ignore' });
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user