Correcting regex matching #26 not working properly on branch definitions
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"base-build": "npm ci && tsc",
|
"base-build": "npm ci && tsc",
|
||||||
"build": "npm run base-build && npm exec -- @vercel/ncc build --source-map lib/src/index.js",
|
"build": "npm run base-build && npm exec -- @vercel/ncc build --source-map lib/src/index.js",
|
||||||
"build-exe": "pkg package.json --compress Gzip",
|
"build-exe": "npm run build && pkg package.json --compress Gzip",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -34,8 +34,9 @@ async function execute() {
|
|||||||
let snapshot: Snapshot | undefined;
|
let snapshot: Snapshot | undefined;
|
||||||
|
|
||||||
// The dependency submission API requires a formatted ref reference so check early fo now
|
// The dependency submission API requires a formatted ref reference so check early fo now
|
||||||
if (`/^refs\//`.match(opts.branchRef) === null) {
|
if (/^refs\//.exec(opts.branchRef) === null) {
|
||||||
console.error(`Branch reference must be in path form, e.g. 'refs/heads/main' for the 'main' branch.`);
|
console.error(`Branch reference must be in path form, e.g. 'refs/heads/main' for the 'main' branch.`);
|
||||||
|
console.error(` provided value was: '${opts.branchRef}'`);
|
||||||
program.help({ error: true });
|
program.help({ error: true });
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user