Skip to content

Commit

Permalink
Support unconventional branch names
Browse files Browse the repository at this point in the history
  • Loading branch information
klippx committed Apr 17, 2023
1 parent 2b692c4 commit 156a37c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ function checkOutRemoteBranch(context) {

// Fetch remote branch
core.info(`Fetching remote branch "${context.branch}"`);
run(`git fetch --no-tags --depth=1 ${remote} ${context.branch}`);
run(`git fetch --no-tags --depth=1 ${remote} "${context.branch}"`);

// Switch to remote branch
core.info(`Switching to the "${context.branch}" branch`);
run(`git branch --force ${context.branch} --track ${remote}/${context.branch}`);
run(`git checkout ${context.branch}`);
run(`git branch --force "${context.branch}" --track "${remote}/${context.branch}"`);
run(`git checkout "${context.branch}"`);
}

/**
Expand Down

0 comments on commit 156a37c

Please sign in to comment.