diff --git a/lib/publish-gh-pages.js b/lib/publish-gh-pages.js index 1a17ab9ee7..a387b07435 100755 --- a/lib/publish-gh-pages.js +++ b/lib/publish-gh-pages.js @@ -67,7 +67,9 @@ if (IS_PULL_REQUEST) { } // When we want to do a cross repo publish (#717), we can allow publishing to the same branch. -const currentRepoUrl = shell.exec('git remote get-url origin').stdout.trim(); +const currentRepoUrl = shell + .exec('git config --get remote.origin.url') + .stdout.trim(); const crossRepoPublish = !currentRepoUrl.endsWith( `${ORGANIZATION_NAME}/${PROJECT_NAME}.git` );