File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -560,6 +560,11 @@ func (m *modifier) modifyFileAttr(fileAttr chezmoi.FileAttr) chezmoi.FileAttr {
560
560
Type : chezmoi .SourceFileTypeSymlink ,
561
561
Template : m .template .modify (fileAttr .Template ),
562
562
}
563
+ case chezmoi .SourceFileTypeRemove :
564
+ return chezmoi.FileAttr {
565
+ TargetName : fileAttr .TargetName ,
566
+ Type : chezmoi .SourceFileTypeRemove ,
567
+ }
563
568
default :
564
569
panic (fmt .Sprintf ("%d: unknown source file type" , fileAttr .Type ))
565
570
}
Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ exec chezmoi chattr empty $HOME${/}.file
6
6
! exists $CHEZMOISOURCEDIR/dot_file
7
7
exists $CHEZMOISOURCEDIR/empty_dot_file
8
8
9
+ # test that chezmoi chattr remove sets the remove attribute on a file
10
+ exec chezmoi chattr remove $HOME${/}.file
11
+ ! exists $CHEZMOISOURCEDIR/empty_dot_file
12
+ exists $CHEZMOISOURCEDIR/remove_dot_file
13
+
14
+ # test that chezmoi chattr noremove removes the remove attribute on a file
15
+ exec chezmoi chattr noremove,empty $HOME${/}.file
16
+ ! exists $CHEZMOISOURCEDIR/remove_dot_file
17
+ exists $CHEZMOISOURCEDIR/empty_dot_file
18
+
9
19
# test that chezmoi attr +p sets the private attribute on a file
10
20
exec chezmoi chattr +p $HOME${/}.file
11
21
! exists $CHEZMOISOURCEDIR/empty_dot_file
You can’t perform that action at this time.
0 commit comments