Skip to content

Commit

Permalink
Fixed git remote configuration in dev container (TryGhost#21459)
Browse files Browse the repository at this point in the history
no issue

- When creating a dev container, the onCreateCommand script will try to
setup the git remotes according to the environment variables defined for
e.g. `$GHOST_UPSTREAM`. There was a bug that caused the `origin` remote
to successfully be renamed to `$GHOST_UPSTREAM`, but the `origin` remote
was not being created successfully on the first try. This commit fixes
that bug.
  • Loading branch information
cmraible authored Oct 29, 2024
1 parent 1d24b2c commit eb9483a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .devcontainer/onCreateCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function setupGitRemotes() {
}
}

remotes = execSync('git remote').toString().trim().split('\n');
if (GHOST_FORK_REMOTE_URL) {
const remoteName = GHOST_FORK_REMOTE_NAME || 'origin';
// Check if the fork remote already exists
Expand Down

0 comments on commit eb9483a

Please sign in to comment.