Skip to content

Commit 69b43cf

Browse files
committed
Fix for @bazel/create --typescript option coming first
1 parent 1300d58 commit 69b43cf

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/create/index.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ function usage(error) {
5555
}
5656

5757
function main(argv, error = console.error, log = console.log) {
58-
const args = require('minimist')(argv);
58+
const args = require('minimist')(argv, {
59+
boolean: ['typescript'],
60+
});
5961

6062
if (!args['_'] || args['_'].length < 1) {
6163
error('Please specify the workspace directory\n');

‎packages/create/test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if (wkspContent.indexOf('yarn_install(') < 0) {
6565
}
6666
// TODO: run bazel in the new directory to verify a build works
6767

68-
exitCode = main(['with_ts', '--typescript'], captureError);
68+
exitCode = main(['--typescript', 'with_ts'], captureError);
6969
if (exitCode != 0) fail('should be success');
7070
let pkgContent = fs.readFileSync('with_ts/package.json', {encoding: 'utf-8'});
7171
if (pkgContent.indexOf('"@bazel/typescript": "latest"') < 0) {

0 commit comments

Comments
 (0)