Skip to content

Commit f475ad9

Browse files
0xalpharushNatalie Chin
and
Natalie Chin
authored
fix solc usage not showing (#122)
* fix solc usage not showing fixes #88 * Run black and rebase dev Co-authored-by: Natalie Chin <[email protected]>
1 parent aca3677 commit f475ad9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: solc_select/__main__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ def solc() -> None:
8383
path = ARTIFACTS_DIR.joinpath(f"solc-{version}", f"solc-{version}")
8484
halt_old_architecture(path)
8585
try:
86+
# Display solc usage when invoked with help flag or without options
87+
check_process = sys.argv[1:] not in ["--help", []]
8688
process = subprocess.run(
87-
[str(path)] + sys.argv[1:], stdout=subprocess.PIPE, stdin=None, check=True
89+
[str(path)] + sys.argv[1:], stdout=subprocess.PIPE, stdin=None, check=check_process
8890
)
8991
print(str(process.stdout, "utf-8"))
9092
except subprocess.CalledProcessError:

0 commit comments

Comments
 (0)