Skip to content

Commit

Permalink
fix git branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Strehle committed Aug 8, 2024
1 parent 3b871b7 commit 60c595c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ enum ContainerStatus {

// try clone with https first
try {
await execCommand(`git clone --depth 1 --recurse-submodules ${this.gitHTTPS} ${repoPath}`, true)
await execCommand(`git clone --depth 1 --single-branch --branch ${this.branch} --recurse-submodules ${this.gitHTTPS} ${repoPath}`, true)
}
catch (e) {

Expand Down Expand Up @@ -735,9 +735,6 @@ enum ContainerStatus {
}
}


await execCommand(`cd ${repoPath} && git checkout ${this.branch}`)

// set debug port
let i=0;
for (const arg of this.args??[]) {
Expand Down Expand Up @@ -990,6 +987,6 @@ async function execCommand<DenoRun extends boolean = false>(command:string, deno
else {
const {status, output} = (await exec(`bash -c "${command.replaceAll('"', '\\"')}"`, {output: OutputMode.Capture}));
if (!status.success) throw output;
else return output as any;
else return output as any;
}
}

0 comments on commit 60c595c

Please sign in to comment.