mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-30 23:06:27 +00:00
build_image.sh: OPTIND prevent unwanted word-splitting
shift $((OPTIND-1)) can be unsafe.To prevent unwanted word-splitting all parameter expansions should be double-quoted. Use the safe form for the command: shift "$((OPTIND-1))" Fixes: #109 Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
This commit is contained in:
parent
8ed7e397e1
commit
eedacc1572
@ -105,7 +105,7 @@ main(){
|
||||
# Agent version
|
||||
[ -n "${agent_version}" ] || agent_version="${kata_version}"
|
||||
|
||||
shift $(( "$OPTIND" - 1 ))
|
||||
shift "$(( $OPTIND - 1 ))"
|
||||
git clone "$osbuilder_url" "${tmp_dir}/osbuilder"
|
||||
pushd "${tmp_dir}/osbuilder"
|
||||
git checkout "${kata_osbuilder_version}"
|
||||
|
Loading…
Reference in New Issue
Block a user