@magpiecloud/mags 1.7.3 → 1.7.4
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/mags.js +1 -1
- package/package.json +1 -1
package/bin/mags.js
CHANGED
|
@@ -1296,7 +1296,7 @@ async function execOnJob(nameOrId, command) {
|
|
|
1296
1296
|
|
|
1297
1297
|
// Wrap command to use chroot if overlay is mounted, with proper env
|
|
1298
1298
|
const escaped = command.replace(/'/g, "'\\''");
|
|
1299
|
-
const wrappedCmd = `if [ -d /overlay/bin ]; then chroot /overlay /bin/sh -lc '${escaped}'; else /bin/sh -lc '${escaped}'; fi`;
|
|
1299
|
+
const wrappedCmd = `if [ -d /overlay/bin ]; then chroot /overlay /bin/sh -lc 'cd /root; ${escaped}'; else cd /root; /bin/sh -lc '${escaped}'; fi`;
|
|
1300
1300
|
// Allocate TTY so interactive CLIs (e.g. claude) work
|
|
1301
1301
|
if (process.stdin.isTTY) {
|
|
1302
1302
|
sshArgs.push('-t');
|