From df72e387ef66a926f12035ac38c3c2e72e83f514 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 15 Jul 2020 22:06:58 +0200 Subject: [PATCH] Respect outFile when detecting no output in asc --- cli/asc.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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);