@tiflis-io/tiflis-code-workstation 0.3.26 → 0.3.27

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.
Files changed (2) hide show
  1. package/dist/main.js +13 -2
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -3046,8 +3046,19 @@ var HeadlessAgentExecutor = class extends EventEmitter {
3046
3046
  const aliasEnvVars = this.getAliasEnvVars();
3047
3047
  const shellEnv = getShellEnv();
3048
3048
  const isUnix = platform() !== "win32";
3049
- const spawnCommand = isUnix ? "setsid" : command;
3050
- const spawnArgs = isUnix ? [command, ...args] : args;
3049
+ let spawnCommand;
3050
+ let spawnArgs;
3051
+ if (isUnix) {
3052
+ const quotedArgs = args.map((arg) => {
3053
+ return `'${arg.replace(/'/g, "'\\''")}'`;
3054
+ });
3055
+ const fullCommand = `${command} ${quotedArgs.join(" ")}`;
3056
+ spawnCommand = "sh";
3057
+ spawnArgs = ["-c", fullCommand];
3058
+ } else {
3059
+ spawnCommand = command;
3060
+ spawnArgs = args;
3061
+ }
3051
3062
  this.subprocess = spawn2(spawnCommand, spawnArgs, {
3052
3063
  cwd: this.workingDir,
3053
3064
  env: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiflis-io/tiflis-code-workstation",
3
- "version": "0.3.26",
3
+ "version": "0.3.27",
4
4
  "description": "Workstation server for tiflis-code - manages agent sessions and terminal access",
5
5
  "author": "Roman Barinov <rbarinov@gmail.com>",
6
6
  "license": "FSL-1.1-NC",