diff --git a/projects/tea.xyz/gx/cc/ld b/projects/tea.xyz/gx/cc/ld index 11ea3688..aa953e55 100755 --- a/projects/tea.xyz/gx/cc/ld +++ b/projects/tea.xyz/gx/cc/ld @@ -8,12 +8,12 @@ PATH=$(echo "$PATH" | tr ":" "\n" | grep -v "$dir" | tr "\n" ":") # If we can find our specific name, e.g. `lld`, # passthrough to that -if which "$exe" 2>&1; then +if which "$exe" >/dev/null 2>&1; then exe=$(which "$exe") # Otherwise, fallback to `ld` # NB: this might not have the right invocations, sometimes; # (invoking `ld` as `lld64.ld`) watch for those potential cases -elif which ld 2>&1; then +elif which ld >/dev/null 2>&1; then exe=$(which ld) else echo 'ld not found in PATH' >&2