s9n-devops-agent 2.0.4 → 2.0.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/bin/cs-devops-agent +11 -19
- package/package.json +1 -1
package/bin/cs-devops-agent
CHANGED
|
@@ -51,27 +51,19 @@ switch(command) {
|
|
|
51
51
|
case 'start':
|
|
52
52
|
case 'session':
|
|
53
53
|
// Start interactive session manager
|
|
54
|
-
//
|
|
55
|
-
const sessionScript = join(rootDir, 'start-devops-session.sh');
|
|
56
|
-
|
|
54
|
+
// On Windows, always use Node.js coordinator (bash may not be available)
|
|
57
55
|
if (process.platform === 'win32') {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
try {
|
|
61
|
-
execSync('bash --version', { stdio: 'ignore' });
|
|
62
|
-
// Bash is available, use the shell script
|
|
63
|
-
runShellScript(sessionScript, args.slice(1));
|
|
64
|
-
} catch (e) {
|
|
65
|
-
// Bash not available, use Node.js session coordinator directly
|
|
66
|
-
console.log('Starting DevOps Agent session manager...\n');
|
|
67
|
-
runScript(join(rootDir, 'src', 'session-coordinator.js'), ['start', ...args.slice(1)]);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
} else if (fs.existsSync(sessionScript)) {
|
|
71
|
-
runShellScript(sessionScript, args.slice(1));
|
|
56
|
+
console.log('Starting DevOps Agent session manager...\n');
|
|
57
|
+
runScript(join(rootDir, 'src', 'session-coordinator.js'), ['start', ...args.slice(1)]);
|
|
72
58
|
} else {
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
// Unix/Mac: use bash script
|
|
60
|
+
const sessionScript = join(rootDir, 'start-devops-session.sh');
|
|
61
|
+
if (fs.existsSync(sessionScript)) {
|
|
62
|
+
runShellScript(sessionScript, args.slice(1));
|
|
63
|
+
} else {
|
|
64
|
+
console.error('Session script not found. Please ensure the package is properly installed.');
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
75
67
|
}
|
|
76
68
|
break;
|
|
77
69
|
|
package/package.json
CHANGED