diff --git a/cli/asc.js b/cli/asc.js index 7879154234..50d5b95cb5 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -720,13 +720,6 @@ exports.main = function main(argv, options, callback) { // Prepare output if (!args.noEmit) { - let hasStdout = false; - let hasOutput = args.textFile != null - || args.binaryFile != null - || args.jsFile != null - || args.tsdFile != null - || args.idlFile != null; - if (args.outFile != null) { if (/\.was?t$/.test(args.outFile) && args.textFile == null) { args.textFile = args.outFile; @@ -737,6 +730,13 @@ exports.main = function main(argv, options, callback) { } } + let hasStdout = false; + let hasOutput = args.textFile != null + || args.binaryFile != null + || args.jsFile != null + || args.tsdFile != null + || args.idlFile != null; + // Write binary if (args.binaryFile != null) { let basename = path.basename(args.binaryFile);