Skip to content

Commit d3551bb

Browse files
committed
Clarify that --out must come before any unknown command line flag
See issue google#283 for background. Review URL: google#284 Closes google#284.
1 parent 0587a9c commit d3551bb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/node/command.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ flags.on('longhelp', function() {
4444
flags.on('--help', function() {
4545
console.log(' Examples:');
4646
console.log('');
47-
console.log(' $ %s a.js', cmdName);
48-
console.log(' $ %s b.js c.js --out compiled.js', cmdName);
47+
console.log(' $ %s a.js [args]', cmdName);
48+
console.log(' $ %s --out compiled.js b.js c.js', cmdName);
4949
console.log('');
5050
});
5151

@@ -120,6 +120,8 @@ function processArguments(argv) {
120120
process.exit(1);
121121
} else if (interpretMode) {
122122
// Add a hint to stop commander.js from parsing following arguments.
123+
// Note that this means that --out must come before any unknown flag as
124+
// well as before any filename for it to be used as the out flag.
123125
argv.splice(i, 0, '--');
124126
// Save traceur flags for interpret.js.
125127
argv.flags = argv.slice(2, i);

0 commit comments

Comments
 (0)