Skip to content

Commit df110b2

Browse files
grossermattbrictson
authored andcommitted
unify string replacement styles
1 parent baff92c commit df110b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/sshkit/command.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def should_map?
145145

146146
def within(&_block)
147147
return yield unless options[:in]
148-
sprintf("cd #{options[:in]} && %s", yield)
148+
"cd #{options[:in]} && #{yield}"
149149
end
150150

151151
def environment_hash
@@ -172,12 +172,12 @@ def user(&_block)
172172

173173
def in_background(&_block)
174174
return yield unless options[:run_in_background]
175-
sprintf("( nohup %s > /dev/null & )", yield)
175+
"( nohup #{yield} > /dev/null & )"
176176
end
177177

178178
def umask(&_block)
179179
return yield unless SSHKit.config.umask
180-
sprintf("umask #{SSHKit.config.umask} && %s", yield)
180+
"umask #{SSHKit.config.umask} && #{yield}"
181181
end
182182

183183
def group(&_block)

0 commit comments

Comments
 (0)