throw error when forgot to pass in GIT_USER (#1035)

This commit is contained in:
Tan Li Hau 2018-10-15 03:27:47 +08:00 committed by Yangshun Tay
parent f22aa221f2
commit 287c4872fe

View file

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