From 156a37c8406a3cb796b511ea673c985f2d716eb0 Mon Sep 17 00:00:00 2001 From: Mathias Klippinge Date: Mon, 17 Apr 2023 17:32:52 +0200 Subject: [PATCH] Support unconventional branch names --- src/git.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/git.js b/src/git.js index a67cb312..61a1bb20 100644 --- a/src/git.js +++ b/src/git.js @@ -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}"`); } /**