Skip to content

Commit

Permalink
fix: Respect outFile when detecting no output in asc (AssemblyScript#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Jul 15, 2020
1 parent ec86d41 commit 1b38b2a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cli/asc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 1b38b2a

Please sign in to comment.