mirror of
https://github.com/asdf-vm/asdf-nodejs.git
synced 2024-10-06 07:42:08 +08:00
Fix resolve_version_query to not kill tee in filter_version_candidates (#264)
Prior to this change the awk 'prog' contained an exit command. When tee attempted to write to the stdout at this point, it received a SIGPIPE signal and exited with an error code of 141. I can't seem to find a way to have tee ignore this signal, but I don't believe the overhead of awk doing a small comparison will have a large/any performance impact especially relative to the processing in filter_version_candidates Fixes #263
This commit is contained in:
parent
c873ec9d13
commit
a32e6c9751
@ -94,7 +94,8 @@ resolve_version_query() {
|
||||
local canon_version="$(
|
||||
# Find the first candidate which the alias match, then print it version
|
||||
print_index_tab \
|
||||
| awk -F'\t' -v "alias=$version_query" '$1 == alias { print $2; exit }'
|
||||
| awk -F'\t' -v "alias=$version_query" '$1 == alias { print $2 }' \
|
||||
| head -n 1
|
||||
)"
|
||||
|
||||
if [ -z "$canon_version" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user