0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-30 22:34:01 -05:00

Fixed git remote configuration in dev container (#21459)

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.
This commit is contained in:
Chris Raible 2024-10-29 15:21:46 -07:00 committed by GitHub
parent 1d24b2c8c0
commit eb9483abb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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