From 4135f16ec1af77099ce13c4550d5c0f1c01c0b80 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 27 Sep 2018 00:16:26 +0100 Subject: [PATCH] f --- solcjs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/solcjs b/solcjs index fa643a95..3c014b4b 100755 --- a/solcjs +++ b/solcjs @@ -55,16 +55,10 @@ if (argv['standard-json']) { abort('Compiler does not support Standard JSON I/O'); } - var size = fs.fstatSync(process.stdin.fd).size; - - if (size <= 0) { - abort('Empty input was read'); - } - // This accepts integer as a parameter, where 0 corresponds to stdin_fileno var input = fs.readFileSync(0); - console.log(solc.compileStandard(input.toString())); + console.log(solc.compileStandard(input.toString('utf8'))); process.exit(0); } else if (files.length === 0) { console.error('Must provide a file');