Fix readonly-paths-from-var trailing DIR
This commit is contained in:
parent
61b0a147af
commit
8fa6d132e1
1 changed files with 3 additions and 2 deletions
|
|
@ -688,12 +688,13 @@ rec {
|
|||
_: var: separator:
|
||||
assert pkgs.lib.isValidPosixName var;
|
||||
include-once "readonly-paths-from-var-${var}" (add-runtime ''
|
||||
while read -rd${lib.escapeShellArg separator} DIR; do
|
||||
IFS=${lib.escapeShellArg separator} read -ra DIRS <<< "''${${var}-}"
|
||||
for DIR in "''${DIRS[@]}"; do
|
||||
if [ -e "$DIR" ]; then
|
||||
P="$(realpath "$DIR")"
|
||||
RUNTIME_ARGS+=(--ro-bind "$P" "$P")
|
||||
fi
|
||||
done <<< "''${${var}-}"
|
||||
done
|
||||
'');
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue