@sanohiro/casty 0.5.2 → 0.5.3
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/bin/casty +5 -1
- package/bin/casty.js +4 -1
- package/package.json +1 -1
package/bin/casty
CHANGED
|
@@ -197,4 +197,8 @@ if needs_update; then
|
|
|
197
197
|
fi
|
|
198
198
|
fi
|
|
199
199
|
|
|
200
|
-
#
|
|
200
|
+
# When called from casty.js, CASTY_ENSURE_CHROME is set — just return
|
|
201
|
+
# When called directly (./bin/casty), launch the app
|
|
202
|
+
if [ -z "$CASTY_ENSURE_CHROME" ]; then
|
|
203
|
+
exec node "$CASTY_DIR/bin/casty.js" "$@"
|
|
204
|
+
fi
|
package/bin/casty.js
CHANGED
|
@@ -8,7 +8,10 @@ import { dirname, join } from 'node:path';
|
|
|
8
8
|
// Ensure Chrome is installed (runs shell script that handles download/update)
|
|
9
9
|
const __bin = dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
try {
|
|
11
|
-
execFileSync('bash', [join(__bin, 'casty')], {
|
|
11
|
+
execFileSync('bash', [join(__bin, 'casty')], {
|
|
12
|
+
stdio: 'inherit',
|
|
13
|
+
env: { ...process.env, CASTY_ENSURE_CHROME: '1' },
|
|
14
|
+
});
|
|
12
15
|
} catch (err) {
|
|
13
16
|
// Shell script prints its own errors — exit if Chrome not available
|
|
14
17
|
if (err.status) process.exit(err.status);
|