mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 21:13:28 +01:00
filesystem: escape shell args
This commit is contained in:
1 parent
3646c27805
commit
bc7fd7238a
1 file changed
+2
-2
@@ -46,7 +46,7 @@
|
||||
default = ''
|
||||
if ! (blkid '${config.device}' | grep -q 'TYPE='); then
|
||||
mkfs.${config.format} \
|
||||
${toString config.extraArgs} \
|
||||
${lib.escapeShellArgs config.extraArgs} \
|
||||
${config.device}
|
||||
fi
|
||||
'';
|
||||
@@ -58,7 +58,7 @@
|
||||
if ! findmnt ${config.device} "${rootMountPoint}${config.mountpoint}" >/dev/null 2>&1; then
|
||||
mount ${config.device} "${rootMountPoint}${config.mountpoint}" \
|
||||
-t "${config.format}" \
|
||||
${lib.concatMapStringsSep " " (opt: "-o ${opt}") config.mountOptions} \
|
||||
${lib.concatMapStringsSep " " (opt: "-o ${lib.escapeShellArg opt}") config.mountOptions} \
|
||||
-o X-mount.mkdir
|
||||
fi
|
||||
'';
|
||||
|
||||
Reference in new issue
Block a user