nixos-rebuild: Fix ShellCheck issue
ShellCheck recommends <https://github.com/koalaman/shellcheck/wiki/SC2174> splitting this into `mkdir` + `chmod`, but based on the discussion with @bjornfor in #357447 it's probably better to keep the atomic directory creation and the probable intent of the original code.
This commit is contained in:
committed by
Bjørn Forsman
parent
84d80cad3e
commit
e61a2da388
@@ -141,7 +141,7 @@ while [ "$#" -gt 0 ]; do
|
||||
fi
|
||||
if [ "$1" != system ]; then
|
||||
profile="/nix/var/nix/profiles/system-profiles/$1"
|
||||
mkdir -p -m 0755 "$(dirname "$profile")"
|
||||
(umask 022 && mkdir -p "$(dirname "$profile")")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user