Skip to content

Commit

Permalink
CLI: reorder files/stdin/help-message (#669)
Browse files Browse the repository at this point in the history
Fix #666
  • Loading branch information
boopathi authored Aug 16, 2017
1 parent b295f35 commit d98869e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/babel-minify/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,12 @@ async function run(args) {

const options = getMinifyOpts(argv);

if (!process.stdin.isTTY) {
return runStdin(argv, options);
} else if (argv._.length <= 0) {
return printHelpInfo({ exitCode: 1 });
if (argv._.length <= 0) {
if (!process.stdin.isTTY) {
return runStdin(argv, options);
} else {
return printHelpInfo({ exitCode: 1 });
}
} else if (argv._.length === 1 && (await isFile(argv._[0]))) {
return runFile(argv, options);
} else {
Expand Down

0 comments on commit d98869e

Please sign in to comment.