Skip to content

Commit

Permalink
Do not capture solc output (#130)
Browse files Browse the repository at this point in the history
We want solc stdout and stderr to go to the corresponding streams,
so just leave them connected when invoking the underlying solc binary.
  • Loading branch information
elopez authored Dec 12, 2022
1 parent 6dbb66c commit 7b493c6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions solc_select/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,11 @@ def solc() -> None:
path = ARTIFACTS_DIR.joinpath(f"solc-{version}", f"solc-{version}")
halt_old_architecture(path)
try:
# Display solc usage when invoked with help flag or without options
check_process = sys.argv[1:] not in ["--help", []]
process = subprocess.run(
[str(path)] + sys.argv[1:], stdout=subprocess.PIPE, stdin=None, check=check_process
subprocess.run(
[str(path)] + sys.argv[1:],
check=True,
)
print(str(process.stdout, "utf-8"))
except subprocess.CalledProcessError:
sys.exit(1)
except subprocess.CalledProcessError as e:
sys.exit(e.returncode)
else:
sys.exit(1)

0 comments on commit 7b493c6

Please sign in to comment.