Skip to content

Commit

Permalink
feat: enhance error message (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Jul 14, 2020
1 parent 6901b8e commit 3d65640
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/set-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ Use deploy_key or personal_token.
if (eventName === 'push') {
isProhibitedBranch = ref.match(new RegExp(`^refs/heads/${publishBranch}$`)) !== null;
if (isProhibitedBranch) {
throw new Error(`You deploy from ${publishBranch} to ${publishBranch}`);
throw new Error(`\
You deploy from ${publishBranch} to ${publishBranch}
This operation is prohibited to protect your contents
`);
}
}

Expand Down

0 comments on commit 3d65640

Please sign in to comment.