File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
lib/specinfra/command/base Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -138,16 +138,16 @@ def get_size(file)
138138 end
139139
140140 def change_mode ( file , mode )
141- "chmod #{ mode } #{ escape ( file ) } "
141+ "chmod -R #{ mode } #{ escape ( file ) } "
142142 end
143143
144144 def change_owner ( file , owner , group = nil )
145145 owner = "#{ owner } :#{ group } " if group
146- "chown #{ owner } #{ escape ( file ) } "
146+ "chown -R #{ owner } #{ escape ( file ) } "
147147 end
148148
149149 def change_group ( file , group )
150- "chgrp #{ group } #{ escape ( file ) } "
150+ "chgrp -R #{ group } #{ escape ( file ) } "
151151 end
152152
153153 def create_as_directory ( file )
Original file line number Diff line number Diff line change 1111end
1212
1313describe get_command ( :change_file_mode , '/tmp' , '0644' ) do
14- it { should eq 'chmod 0644 /tmp' }
14+ it { should eq 'chmod -R 0644 /tmp' }
1515end
1616
1717describe get_command ( :change_file_owner , '/tmp' , 'root' ) do
18- it { should eq 'chown root /tmp' }
18+ it { should eq 'chown -R root /tmp' }
1919end
2020
2121describe get_command ( :change_file_owner , '/tmp' , 'root' , 'root' ) do
22- it { should eq 'chown root:root /tmp' }
22+ it { should eq 'chown -R root:root /tmp' }
2323end
2424
2525describe get_command ( :change_file_group , '/tmp' , 'root' ) do
26- it { should eq 'chgrp root /tmp' }
26+ it { should eq 'chgrp -R root /tmp' }
2727end
2828
2929describe get_command ( :create_file_as_directory , '/tmp' ) do
You can’t perform that action at this time.
0 commit comments