Skip to content

Commit

Permalink
throw error when forgot to pass in GIT_USER (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau authored and yangshun committed Oct 14, 2018
1 parent f22aa22 commit 287c487
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions v1/lib/publish-gh-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
Expand Down

0 comments on commit 287c487

Please sign in to comment.