chore: minor fix to the package update version bumper (#11448)

This commit is contained in:
Andrey Lushnikov 2022-01-18 01:55:37 -07:00 committed by GitHub
parent daa2f00bfb
commit 9f689865b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,10 +24,10 @@ const { packages, packagesToPublish } = require('./list_packages.js');
(async () => {
const version = process.argv[2];
if (version.startsWith('v'))
throw new Error('Version must not start with "v"');
if (!version)
throw new Error('Please specify version! See --help for more information.');
if (version.startsWith('v'))
throw new Error('Version must not start with "v"');
if (process.argv[2] === '--help')
throw new Error(`Usage: node ${path.relative(process.cwd(), __filename)} <version>`);
const rootDir = path.join(__dirname, '..');