Skip to content

chore: fix subprocess silence logic in compiler selection#1464

Open
mdqst wants to merge 1 commit intocrytic:masterfrom
mdqst:patch-1
Open

chore: fix subprocess silence logic in compiler selection#1464
mdqst wants to merge 1 commit intocrytic:masterfrom
mdqst:patch-1

Conversation

@mdqst
Copy link
Copy Markdown

@mdqst mdqst commented Oct 1, 2025

noticed a small issue in how we were setting silent for the compiler subprocess.
previously it used a combination of and/or which can lead to unexpected results.

changed it to a clear ternary expression:

silent = subprocess.DEVNULL if os.getenv("SOLC_SELECT_SILENT", "1") == "1" else None

now the behavior is straightforward and consistent.

@elopez
Copy link
Copy Markdown
Member

elopez commented Nov 10, 2025

hi! out of curiosity, what prompted this change? do you use this script somewhere? and what issues did you see? (I'm not sure how the and/or pseudo-ternary could fail here, but I agree the if/else is clearer)

I'm mainly asking as we only copy this script to the distroless docker target, and that is not a docker target we ever built on CI or people use. I've thought about removing it altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants