syntaur 0.25.0 → 0.25.1

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.
@@ -3124,13 +3124,29 @@ function buildTerminalInvocation(plan) {
3124
3124
  return {
3125
3125
  command: "osascript",
3126
3126
  args: [
3127
+ "-e",
3128
+ 'set wasRunning to application "Terminal" is running',
3127
3129
  "-e",
3128
3130
  'tell application "Terminal"',
3129
3131
  "-e",
3130
3132
  "activate",
3131
3133
  "-e",
3134
+ "if wasRunning then",
3135
+ "-e",
3132
3136
  `do script ${appleScriptString(cdAndRun)}`,
3133
3137
  "-e",
3138
+ "else",
3139
+ "-e",
3140
+ "repeat until (count of windows) > 0",
3141
+ "-e",
3142
+ "delay 0.1",
3143
+ "-e",
3144
+ "end repeat",
3145
+ "-e",
3146
+ `do script ${appleScriptString(cdAndRun)} in window 1`,
3147
+ "-e",
3148
+ "end if",
3149
+ "-e",
3134
3150
  "end tell"
3135
3151
  ]
3136
3152
  };