Skip to content

Commit

Permalink
Update worktree.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Sep 29, 2024
1 parent a93ccc9 commit f24119c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/worktree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ export async function generateWorktree(
'Error encountered while checking out branch. Attempting to continue with a new branch name.'
)

// Ensure that we have the latest data from origin to ensure that the remote branch can be tracked.
// It's possible to get in this state if there were workflow changes mid-deployment.
await execute(
`git fetch origin`,
`${action.workspace}/${worktreedir}`,
`git fetch --no-recurse-submodules --depth=1 origin ${action.branch}`,
action.workspace,
action.silent
)

Expand Down

0 comments on commit f24119c

Please sign in to comment.