fix(runner): set GIT_TERMINAL_PROMPT=0 for non-interactive clone
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -234,7 +234,7 @@ const server = createServer(async (req, res) => {
|
|||||||
try {
|
try {
|
||||||
// Clean existing clone
|
// Clean existing clone
|
||||||
execSync(`rm -rf ${svcSourcePath}/*`, { timeout: 10_000 });
|
execSync(`rm -rf ${svcSourcePath}/*`, { timeout: 10_000 });
|
||||||
execSync(`git clone --depth 1 ${gitBranch ? `--branch ${gitBranch}` : ""} ${gitUrl} .`, { cwd: svcSourcePath, timeout: 120_000, stdio: "pipe" });
|
execSync(`git clone --depth 1 ${gitBranch ? `--branch ${gitBranch}` : ""} ${gitUrl} .`, { cwd: svcSourcePath, timeout: 120_000, stdio: "pipe", env: { ...process.env, GIT_TERMINAL_PROMPT: "0" } });
|
||||||
console.log(`[runner] git clone complete: ${gitUrl} -> ${svcSourcePath}`);
|
console.log(`[runner] git clone complete: ${gitUrl} -> ${svcSourcePath}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return json(res, 500, { error: `git clone failed: ${e.message}` });
|
return json(res, 500, { error: `git clone failed: ${e.message}` });
|
||||||
|
|||||||
Reference in New Issue
Block a user