feat: enhance error message (#398)

This commit is contained in:
Shohei Ueda authored and GitHub committed 2020-07-15 02:04:43 +09:00
1 parent 6901b8e8fc
commit 3d656402e5
1 file changed
+4 -1
+4 -1
View File
@@ -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
`);
}
}