Fix cutting of paths with equals signs

Cut splits by equals sign and takes the second field. This ignores path
contents after a second equals sign. Currently this prevents the
installation on NixOS as the nix store path automatically contains a
"=".

This PR instead selects all but the first field and equals sign, leaving
the passed paths as intended.
Simon Plakolb 2 years ago committed by Pablo Aguiar
parent 252566fd68
commit 55da5f7b6f

@ -54,13 +54,13 @@ Options:
set -g OMF_CHANNEL dev
case '--channel=*'
abort "Unknown release channel \""(echo "$argv[1]" | command cut -d= -f2)"\"."
abort "Unknown release channel \""(echo "$argv[1]" | command cut -d= -f2-)"\"."
case --check
set -g CHECK_ONLY
case '--config=*'
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OMF_CONFIG
echo "$argv[1]" | command cut -d= -f2- | command sed -e "s#~#$HOME#" | read -g OMF_CONFIG
case --noninteractive
set -g NONINTERACTIVE
@ -70,10 +70,10 @@ Options:
case '--offline=*'
set -g OFFLINE
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OFFLINE_PATH
echo "$argv[1]" | command cut -d= -f2- | command sed -e "s#~#$HOME#" | read -g OFFLINE_PATH
case '--path=*'
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OMF_PATH
echo "$argv[1]" | command cut -d= -f2- | command sed -e "s#~#$HOME#" | read -g OMF_PATH
case --uninstall
set -g UNINSTALL

@ -1 +1 @@
c55853fcc09956fbea8f006a5b86705c71b879348a9240d8f014d0c81233ccf2 install
429a76e5b5e692c921aa03456a41258b614374426f959535167222a28b676201 install

Loading…
Cancel
Save