forked from nix-community/home-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
files: make sure the target file name is escaped
The previous implementation would allow variables to sneak into the file names. This commit makes sure the resulting target file path exactly matches the expected path.
- Loading branch information
1 parent
eb43b5d
commit 1911b0c
Showing
3 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
{ | ||
config = { | ||
home.file."$HOME/$FOO/bar baz".text = "blah"; | ||
|
||
nmt.script = '' | ||
assertFileExists 'home-files/$HOME/$FOO/bar baz'; | ||
assertFileContent 'home-files/$HOME/$FOO/bar baz' \ | ||
${pkgs.writeText "expected" "blah"} | ||
''; | ||
}; | ||
} |