claude-issue-solver 1.44.2 → 1.45.0
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/dist/utils/helpers.js +19 -9
- package/package.json +1 -1
package/dist/utils/helpers.js
CHANGED
|
@@ -91,17 +91,27 @@ end tell`;
|
|
|
91
91
|
}
|
|
92
92
|
function openInNewTerminal(script) {
|
|
93
93
|
const platform = os.platform();
|
|
94
|
+
// Strip any surrounding quotes from the script path
|
|
95
|
+
const cleanScript = script.replace(/^['"]|['"]$/g, '');
|
|
94
96
|
if (platform === 'darwin') {
|
|
95
|
-
// macOS - use
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
// macOS - use 'open' command which doesn't require automation permissions
|
|
98
|
+
// Create a .command file which Terminal will execute when opened
|
|
99
|
+
const commandFile = cleanScript.replace(/\.sh$/, '.command');
|
|
100
|
+
try {
|
|
101
|
+
// Copy the script to a .command file (Terminal executes these automatically)
|
|
102
|
+
fs.copyFileSync(cleanScript, commandFile);
|
|
103
|
+
fs.chmodSync(commandFile, '755');
|
|
104
|
+
// Prefer iTerm if installed, otherwise use default Terminal
|
|
105
|
+
if (fs.existsSync('/Applications/iTerm.app')) {
|
|
106
|
+
(0, child_process_1.execSync)(`open -a iTerm "${commandFile}"`, { stdio: 'pipe' });
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
(0, child_process_1.execSync)(`open "${commandFile}"`, { stdio: 'pipe' });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
103
113
|
console.log('Could not open new terminal. Run manually:');
|
|
104
|
-
console.log(
|
|
114
|
+
console.log(cleanScript);
|
|
105
115
|
}
|
|
106
116
|
}
|
|
107
117
|
else if (platform === 'linux') {
|