From 885b89504c06f9eb413dc20c94e942e89f5c8c55 Mon Sep 17 00:00:00 2001 From: Zetherz <32152358+zetherz@users.noreply.github.com> Date: Wed, 25 Jul 2018 22:39:05 -0500 Subject: [PATCH] allow multiple solc-paths --- flattener/core.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/flattener/core.py b/flattener/core.py index 855c4a7..fc8d0b5 100755 --- a/flattener/core.py +++ b/flattener/core.py @@ -89,13 +89,12 @@ def main(): help="Specifies the path replacements to pass onto solidity. See solc --help for more information.") args = parser.parse_args() + solc_args = ["solc", "--ast", args.target_solidity_file] if args.solc_paths: - solc_args = ["solc", args.solc_paths, "--ast", args.target_solidity_file] - else: - solc_args = ["solc", "--ast", args.target_solidity_file] + solc_args[1:1] = args.solc_paths.split() solc_proc = subprocess.run(solc_args, stdout=subprocess.PIPE, universal_newlines=True) solc_proc.check_returncode() flatten_contract(solc_proc.stdout, args.output) if __name__ == '__main__': - main() \ No newline at end of file + main()