claude-issue-solver 1.44.3 → 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 +17 -18
- package/package.json +1 -1
package/dist/utils/helpers.js
CHANGED
|
@@ -91,28 +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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (stderr.includes('-1743') || stderr.includes('Not authorised')) {
|
|
106
|
-
console.log('\n⚠️ macOS automation permission required!\n');
|
|
107
|
-
console.log('To fix this, go to:');
|
|
108
|
-
console.log(' System Settings → Privacy & Security → Automation\n');
|
|
109
|
-
console.log('Then enable "Terminal" for the app you\'re running this from.');
|
|
110
|
-
console.log('\nAfter granting permission, run the command again.\n');
|
|
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' });
|
|
111
107
|
}
|
|
112
108
|
else {
|
|
113
|
-
|
|
109
|
+
(0, child_process_1.execSync)(`open "${commandFile}"`, { stdio: 'pipe' });
|
|
114
110
|
}
|
|
115
|
-
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
console.log('Could not open new terminal. Run manually:');
|
|
114
|
+
console.log(cleanScript);
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
117
|
else if (platform === 'linux') {
|