Browse Source

npmsearch: fix broken version handling

DanielFGray 1 year ago
parent
commit
ed1f86f0c7
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      npmsearch

+ 1
- 1
npmsearch View File

@@ -107,7 +107,7 @@ case "${key,,}" in
107 107
   ctrl-g) global=1 ;;
108 108
   ctrl-v)
109 109
     package="${packages[1]%% *}"
110
-    version=$(
110
+    mapfile -t version < <(
111 111
       npm -s --json view "$package" |
112 112
         jq -r '.versions[]' |  # label with .dist-tags?
113 113
         fzf --header="choose version for $package  |  C-d saves as devDependency" --tac --expect='ctrl-d,esc')

Loading…
Cancel
Save