storymode-cli 1.3.4 → 1.3.5
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/cli.mjs +3 -2
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -252,8 +252,9 @@ export async function run(args) {
|
|
|
252
252
|
// so we avoid tmux entirely and use AppleScript to split the pane.
|
|
253
253
|
if (renderMode.protocol === 'iterm2' && !renderMode.inTmux) {
|
|
254
254
|
try {
|
|
255
|
-
// Wrap
|
|
256
|
-
|
|
255
|
+
// Wrap in bash -c: iTerm2's "command" uses execve directly (no shell),
|
|
256
|
+
// so env vars and || operators won't work without an explicit shell.
|
|
257
|
+
const wrappedCmd = `bash -c '${companionCmd} || { echo; echo " Companion crashed. Press enter to close."; read; }'`;
|
|
257
258
|
const escapedCmd = wrappedCmd.replace(/"/g, '\\"');
|
|
258
259
|
execSync(`osascript -e '
|
|
259
260
|
tell application "iTerm2"
|