Fix perl one liner bug

decode_json returns hash reference, so scalar variable should be
used instead of hash variable.
This commit is contained in:
Shohei YOSHIDA 2021-12-30 11:51:55 +09:00
parent b3876c5982
commit d84a6d3b21
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ _yarn_commands_scripts() {
fi
if [[ -n $packageJson ]]; then
scripts=($(cat "$packageJson" | perl -0777 -MJSON::PP -n -E '%r=decode_json($_); say for sort keys %{$r->{scripts}}'))
scripts=($(cat "$packageJson" | perl -0777 -MJSON::PP -n -E '$r=decode_json($_); say for sort keys %{$r->{scripts}}'))
fi
_describe 'command or script' _commands -- _global_commands -- scripts -- binaries