mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-02-02 22:59:06 +08:00
fix: use /bin/sh for Alpine-based images (rclone/rclone) in docker provider
The rclone/rclone image is Alpine-based and only has /bin/sh, not /bin/bash. This fixes exit code 127 errors when running rclone commands in containers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
@@ -8962,7 +8962,9 @@ class Docker {
|
||||
const githubWorkflow = node_path_1.default.join(runnerTempPath, '_github_workflow');
|
||||
if (!(0, node_fs_1.existsSync)(githubWorkflow))
|
||||
(0, node_fs_1.mkdirSync)(githubWorkflow);
|
||||
const commandPrefix = image === `alpine` ? `/bin/sh` : `/bin/bash`;
|
||||
// Alpine-based images (alpine, rclone/rclone, etc.) don't have /bin/bash, only /bin/sh
|
||||
const isAlpineBasedImage = image === 'alpine' || image.startsWith('rclone/');
|
||||
const commandPrefix = isAlpineBasedImage ? `/bin/sh` : `/bin/bash`;
|
||||
return `docker run \
|
||||
--workdir ${dockerWorkspacePath} \
|
||||
--rm \
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -55,7 +55,10 @@ class Docker {
|
||||
if (!existsSync(githubHome)) mkdirSync(githubHome);
|
||||
const githubWorkflow = path.join(runnerTempPath, '_github_workflow');
|
||||
if (!existsSync(githubWorkflow)) mkdirSync(githubWorkflow);
|
||||
const commandPrefix = image === `alpine` ? `/bin/sh` : `/bin/bash`;
|
||||
|
||||
// Alpine-based images (alpine, rclone/rclone, etc.) don't have /bin/bash, only /bin/sh
|
||||
const isAlpineBasedImage = image === 'alpine' || image.startsWith('rclone/');
|
||||
const commandPrefix = isAlpineBasedImage ? `/bin/sh` : `/bin/bash`;
|
||||
|
||||
return `docker run \
|
||||
--workdir ${dockerWorkspacePath} \
|
||||
|
||||
Reference in New Issue
Block a user