Skip to content

Commit d98869e

Browse files
authored
CLI: reorder files/stdin/help-message (#669)
Fix #666
1 parent b295f35 commit d98869e

File tree

1 file changed

+6
-4
lines changed
  • packages/babel-minify/src

1 file changed

+6
-4
lines changed

packages/babel-minify/src/cli.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,12 @@ async function run(args) {
252252

253253
const options = getMinifyOpts(argv);
254254

255-
if (!process.stdin.isTTY) {
256-
return runStdin(argv, options);
257-
} else if (argv._.length <= 0) {
258-
return printHelpInfo({ exitCode: 1 });
255+
if (argv._.length <= 0) {
256+
if (!process.stdin.isTTY) {
257+
return runStdin(argv, options);
258+
} else {
259+
return printHelpInfo({ exitCode: 1 });
260+
}
259261
} else if (argv._.length === 1 && (await isFile(argv._[0]))) {
260262
return runFile(argv, options);
261263
} else {

0 commit comments

Comments
 (0)