File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,13 +165,7 @@ def quotelist( *args )
165165 ### Run the specified command +cmd+ with system(), failing if the execution
166166 ### fails.
167167 def run ( *cmd )
168- cmd . flatten!
169-
170- if cmd . length > 1
171- trace ( quotelist ( *cmd ) )
172- else
173- trace ( cmd )
174- end
168+ trace ( cmd . length == 1 ? cmd . first : quotelist ( *cmd ) )
175169
176170 system ( *cmd )
177171 raise "Command failed: [%s]" % [ cmd . join ( ' ' ) ] unless $?. success?
@@ -180,13 +174,7 @@ def run( *cmd )
180174 ### Run the specified command +cmd+ after redirecting stdout and stderr to the specified
181175 ### +logpath+, failing if the execution fails.
182176 def log_and_run ( logpath , *cmd )
183- cmd . flatten!
184-
185- if cmd . length > 1
186- trace ( quotelist ( *cmd ) )
187- else
188- trace ( cmd )
189- end
177+ trace ( cmd . length == 1 ? cmd . first : quotelist ( *cmd ) )
190178
191179 # Eliminate the noise of creating/tearing down the database by
192180 # redirecting STDERR/STDOUT to a logfile
You can’t perform that action at this time.
0 commit comments