File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ appear at the top.
1010 * make sure working directory for commands is properly cleared after ` within ` blocks
1111 [ PR #307 ] ( https://github.com/capistrano/sshkit/pull/307 )
1212 @steved
13+ * display more accurate string for commands with spaces being output in ` Formatter::Pretty `
14+ [ PR #304 ] ( https://github.com/capistrano/sshkit/pull/304 )
15+ @steved
1316
1417## 1.8.1
1518
Original file line number Diff line number Diff line change @@ -206,7 +206,11 @@ def to_command
206206 end
207207
208208 def to_s
209- [ SSHKit . config . command_map [ command . to_sym ] , *Array ( args ) ] . join ( ' ' )
209+ if should_map?
210+ [ SSHKit . config . command_map [ command . to_sym ] , *Array ( args ) ] . join ( ' ' )
211+ else
212+ command . to_s
213+ end
210214 end
211215
212216 private
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def printer
2222 def test_execute
2323 printer . execute 'uname -a'
2424 assert_output_lines (
25- ' INFO [aaaaaa] Running /usr/bin/env uname -a on example.com' ,
25+ ' INFO [aaaaaa] Running uname -a on example.com' ,
2626 ' DEBUG [aaaaaa] Command: uname -a'
2727 )
2828 end
@@ -31,7 +31,7 @@ def test_test_method
3131 printer . test '[ -d /some/file ]'
3232
3333 assert_output_lines (
34- ' DEBUG [aaaaaa] Running /usr/bin/env [ -d /some/file ] on example.com' ,
34+ ' DEBUG [aaaaaa] Running [ -d /some/file ] on example.com' ,
3535 ' DEBUG [aaaaaa] Command: [ -d /some/file ]'
3636 )
3737 end
@@ -42,7 +42,7 @@ def test_capture
4242 assert_equal '' , result
4343
4444 assert_output_lines (
45- ' DEBUG [aaaaaa] Running /usr/bin/env ls -l on example.com' ,
45+ ' DEBUG [aaaaaa] Running ls -l on example.com' ,
4646 ' DEBUG [aaaaaa] Command: ls -l'
4747 )
4848 end
@@ -70,4 +70,4 @@ def assert_output_lines(*expected_lines)
7070 end
7171 end
7272 end
73- end
73+ end
You can’t perform that action at this time.
0 commit comments