squad-station 0.8.21 → 0.8.22
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/run.js +20 -11
- package/package.json +1 -1
package/bin/run.js
CHANGED
|
@@ -45,7 +45,7 @@ function install() {
|
|
|
45
45
|
|
|
46
46
|
function installBinary() {
|
|
47
47
|
// Binary version — may differ from npm package version
|
|
48
|
-
var VERSION = '0.8.
|
|
48
|
+
var VERSION = '0.8.22';
|
|
49
49
|
var REPO = 'thientranhung/squad-station';
|
|
50
50
|
|
|
51
51
|
var isWindows = process.platform === 'win32';
|
|
@@ -201,19 +201,28 @@ function verifyInPath(destPath, installDir) {
|
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
// macOS/Linux: auto-add to shell
|
|
204
|
+
// macOS/Linux: auto-add to shell env file
|
|
205
|
+
// IMPORTANT: Use .zshenv (not .zshrc) because Claude Code's Bash tool runs
|
|
206
|
+
// non-interactive shells that only source .zshenv. Without this, AI agents
|
|
207
|
+
// inside tmux sessions cannot find squad-station binary.
|
|
205
208
|
var home = process.env.HOME || '';
|
|
206
209
|
var exportLine = 'export PATH="$HOME/.squad/bin:$PATH"';
|
|
207
210
|
var profileCandidates = process.platform === 'darwin'
|
|
208
|
-
? ['.zshrc', '.bash_profile', '.bashrc']
|
|
209
|
-
: ['.bashrc', '.zshrc', '.profile'];
|
|
210
|
-
|
|
211
|
-
//
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
211
|
+
? ['.zshenv', '.zshrc', '.bash_profile', '.bashrc']
|
|
212
|
+
: ['.bashrc', '.zshenv', '.zshrc', '.profile'];
|
|
213
|
+
|
|
214
|
+
// On macOS, always use .zshenv (required for Claude Code compatibility).
|
|
215
|
+
// On Linux, find first existing profile or default to primary.
|
|
216
|
+
var profileName;
|
|
217
|
+
if (process.platform === 'darwin') {
|
|
218
|
+
profileName = '.zshenv';
|
|
219
|
+
} else {
|
|
220
|
+
profileName = profileCandidates[0];
|
|
221
|
+
for (var i = 0; i < profileCandidates.length; i++) {
|
|
222
|
+
if (fs.existsSync(path.join(home, profileCandidates[i]))) {
|
|
223
|
+
profileName = profileCandidates[i];
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
217
226
|
}
|
|
218
227
|
}
|
|
219
228
|
var profilePath = path.join(home, profileName);
|