Without the single quotes ssh wasn't executing the command remotely but locally where it failed as the local directory structure is different from the remote directory structure.
Dave
def set_hook_permissions
if @target.host
@shell.run "ssh #{@target.user}@#{@target.host} '#{make_hook_executable}'"
else
@shell.run "#{make_hook_executable}"
end
end
Without the single quotes ssh wasn't executing the command remotely but locally where it failed as the local directory structure is different from the remote directory structure.
Dave
def set_hook_permissions if @target.host @shell.run "ssh #{@target.user}@#{@target.host} '#{make_hook_executable}'" else @shell.run "#{make_hook_executable}" end end