Skip to content

Commit 3d65640

Browse files
authored
feat: enhance error message (#398)
1 parent 6901b8e commit 3d65640

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/set-tokens.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ Use deploy_key or personal_token.
8585
if (eventName === 'push') {
8686
isProhibitedBranch = ref.match(new RegExp(`^refs/heads/${publishBranch}$`)) !== null;
8787
if (isProhibitedBranch) {
88-
throw new Error(`You deploy from ${publishBranch} to ${publishBranch}`);
88+
throw new Error(`\
89+
You deploy from ${publishBranch} to ${publishBranch}
90+
This operation is prohibited to protect your contents
91+
`);
8992
}
9093
}
9194

0 commit comments

Comments
 (0)