diff --git a/testdata/scripts/applysourcepath.txt b/testdata/scripts/applysourcepath.txt new file mode 100644 index 00000000000..98a1dd8be38 --- /dev/null +++ b/testdata/scripts/applysourcepath.txt @@ -0,0 +1,15 @@ +mksourcedir + +# test that chezmoi apply --source-path only applies the target +chezmoi apply --source-path $CHEZMOISOURCEDIR/dot_file +! exists $HOME/.empty +exists $HOME/.file +chezmoi apply --source-path $CHEZMOISOURCEDIR/empty_dot_empty +exists $HOME/.empty + +# test that chezmoi apply --source-path ignores other modified files +edit $HOME/.file +chezmoi status +stdout 'MM \.file' +chezmoi apply --source-path $CHEZMOISOURCEDIR/executable_dot_executable +exists $HOME/.executable