Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dockerd-rootless.sh: Fix variable not double quotes cause unexpected …
…behavior ``` $ cat test.sh echo "orign value=$XDG_RUNTIME_DIR" echo "1. with [ ] not quote ..." [ -w $XDG_RUNTIME_DIR ] echo "get 1 ret_code: $?" echo "2. with [ ] and quote ..." [ -w "$XDG_RUNTIME_DIR" ] echo "get 2 ret_code: $?" $ sh ./test.sh orign value= 1. with [ ] not quote ... get 1 ret_code: 0 2. with [ ] and quote ... get 2 ret_code: 1 $ bash ./test.sh orign value= 1. with [ ] not quote ... get 1 ret_code: 0 2. with [ ] and quote ... get 2 ret_code: 1 ``` Signed-off-by: Chenyang Yan <memory.yancy@gmail.com> (cherry picked from commit a8ce4d4) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Loading branch information