diff --git a/v1/lib/publish-gh-pages.js b/v1/lib/publish-gh-pages.js index 9aeb8c868909..82b5e9d98588 100755 --- a/v1/lib/publish-gh-pages.js +++ b/v1/lib/publish-gh-pages.js @@ -54,6 +54,13 @@ if (!PROJECT_NAME) { shell.exit(0); } +if (USE_SSH !== 'true' && !GIT_USER) { + shell.echo( + "Missing git user. Did you forget to export the 'GIT_USER' environment variable?", + ); + shell.exit(0); +} + let remoteBranch; if (USE_SSH === 'true') { remoteBranch = `git@${GITHUB_HOST}:${ORGANIZATION_NAME}/${PROJECT_NAME}.git`;