@@ -19,7 +19,7 @@ def self.gain_permissions_mkpath(path, command: SystemCommand)
1919 if dir . writable?
2020 path . mkpath
2121 else
22- command . run! ( "/bin/ mkdir" , args : [ "-p" , "--" , path ] , sudo : true , print_stderr : false )
22+ command . run! ( "mkdir" , args : [ "-p" , "--" , path ] , sudo : true , print_stderr : false )
2323 end
2424 end
2525
@@ -28,7 +28,7 @@ def self.gain_permissions_rmdir(path, command: SystemCommand)
2828 if p . parent . writable?
2929 FileUtils . rmdir p
3030 else
31- command . run! ( "/bin/ rmdir" , args : [ "--" , p ] , sudo : true , print_stderr : false )
31+ command . run! ( "rmdir" , args : [ "--" , p ] , sudo : true , print_stderr : false )
3232 end
3333 end
3434 end
@@ -77,10 +77,10 @@ def self.gain_permissions(path, command_args, command)
7777 command . run ( "/usr/bin/chflags" ,
7878 print_stderr :,
7979 args : command_args + [ "--" , "000" , path ] )
80- command . run ( "/bin/ chmod" ,
80+ command . run ( "chmod" ,
8181 print_stderr :,
8282 args : command_args + [ "--" , "u+rwx" , path ] )
83- command . run ( "/bin/ chmod" ,
83+ command . run ( "chmod" ,
8484 print_stderr :,
8585 args : command_args + [ "-N" , path ] )
8686 tried_permissions = true
@@ -92,7 +92,7 @@ def self.gain_permissions(path, command_args, command)
9292 # TODO: Further examine files to see if ownership is the problem
9393 # before using `sudo` and `chown`.
9494 ohai "Using sudo to gain ownership of path '#{ path } '"
95- command . run ( "/usr/sbin/ chown" ,
95+ command . run ( "chown" ,
9696 args : command_args + [ "--" , User . current , path ] ,
9797 sudo : true )
9898 tried_ownership = true
0 commit comments