Skip to content

Commit 6d0a1a1

Browse files
Update index.js
1 parent 6fc3645 commit 6d0a1a1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/devextreme-cli/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
#!/usr/bin/env node
2-
const args = require('minimist')(process.argv.slice(2), {
2+
const rawArgs = process.argv.slice(2);
3+
const hasEmptyFlag = rawArgs.some(arg => arg === '--empty' || arg.startsWith('--empty='));
4+
5+
const args = require('minimist')(rawArgs, {
36
alias: { v: 'version' },
47
boolean: ['empty']
58
});
69

710
const commands = args['_'];
811
delete args['_'];
12+
13+
// Remove empty flag if it wasn't explicitly provided to prevent passing it to commands that don't support it
14+
if(!hasEmptyFlag) {
15+
delete args.empty;
16+
}
917
const themeBuilder = require('./src/themebuider');
1018
const application = require('./src/application');
1119
const devextremeConfig = require('./src/utility/devextreme-config');

0 commit comments

Comments
 (0)