forked from kiss-community/kiss
kiss: disallow spaces inside arguments.
This has never been supported. The package manager now aborts if any spaces are present in arguments.
This commit is contained in:
parent
185b949628
commit
bc9fb7b1b2
24
kiss
24
kiss
@ -1702,28 +1702,28 @@ args() {
|
|||||||
# not be used here as they would conflict with kiss extensions.
|
# not be used here as they would conflict with kiss extensions.
|
||||||
case $action in
|
case $action in
|
||||||
a|alternatives)
|
a|alternatives)
|
||||||
case $1 in *\**|*\!*|*\[*|*\]*|*/*)
|
case $1 in *\**|*\!*|*\[*|*\ *|*\]*|*/*)
|
||||||
die "Invalid argument: '!*[]/' ($1)"
|
die "Invalid argument: '!*[ ]/' ($1)"
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
b|build|c|checksum|d|download|i|install|l|list|r|remove)
|
b|build|c|checksum|d|download|i|install|l|list|r|remove)
|
||||||
case ${action%%"${action#?}"}-$* in
|
for _arg do case ${action%%"${action#?}"}-$_arg in
|
||||||
i-*\!*|i-*\**|i-*\[*|i-*\]*)
|
i-*\!*|i-*\**|i-*\[*|i-*\ *|i-*\]*)
|
||||||
die "Arguments contain invalid characters: '!*[]' ($*)"
|
die "Argument contains invalid characters: '!*[ ]' ('$_arg')"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
[!i]-*\!*|[!i]-*\**|[!i]-*\[*|[!i]-*\]*|[!i]-*/*)
|
[!i]-*\!*|[!i]-*\**|[!i]-*\[*|[!i]-*\ *|[!i]-*\]*|[!i]-*/*)
|
||||||
die "Arguments contain invalid characters: '!*[]/' ($*)"
|
die "Argument contains invalid characters: '!*[ ]/' ('$_arg')"
|
||||||
;;
|
;;
|
||||||
|
esac done
|
||||||
|
|
||||||
[!l]-)
|
# When no arguments are given on the command-line, use the basename of
|
||||||
# Add parent directory to repository list.
|
# the current directory as the package name and add the parent directory
|
||||||
|
# to the running process' KISS_PATH.
|
||||||
|
case $# in 0)
|
||||||
export KISS_PATH=${PWD%/*}:$KISS_PATH
|
export KISS_PATH=${PWD%/*}:$KISS_PATH
|
||||||
|
|
||||||
# Use basename of current directory as package.
|
|
||||||
set -- "${PWD##*/}"
|
set -- "${PWD##*/}"
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Order the argument list based on dependence.
|
# Order the argument list based on dependence.
|
||||||
|
Loading…
Reference in New Issue
Block a user