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.
10
10
* make sure working directory for commands is properly cleared after ` within ` blocks
11
11
[ PR #307 ] ( https://github.com/capistrano/sshkit/pull/307 )
12
12
@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
13
16
14
17
## 1.8.1
15
18
Original file line number Diff line number Diff line change @@ -206,7 +206,11 @@ def to_command
206
206
end
207
207
208
208
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
210
214
end
211
215
212
216
private
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def printer
22
22
def test_execute
23
23
printer . execute 'uname -a'
24
24
assert_output_lines (
25
- ' INFO [aaaaaa] Running /usr/bin/env uname -a on example.com' ,
25
+ ' INFO [aaaaaa] Running uname -a on example.com' ,
26
26
' DEBUG [aaaaaa] Command: uname -a'
27
27
)
28
28
end
@@ -31,7 +31,7 @@ def test_test_method
31
31
printer . test '[ -d /some/file ]'
32
32
33
33
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' ,
35
35
' DEBUG [aaaaaa] Command: [ -d /some/file ]'
36
36
)
37
37
end
@@ -42,7 +42,7 @@ def test_capture
42
42
assert_equal '' , result
43
43
44
44
assert_output_lines (
45
- ' DEBUG [aaaaaa] Running /usr/bin/env ls -l on example.com' ,
45
+ ' DEBUG [aaaaaa] Running ls -l on example.com' ,
46
46
' DEBUG [aaaaaa] Command: ls -l'
47
47
)
48
48
end
@@ -70,4 +70,4 @@ def assert_output_lines(*expected_lines)
70
70
end
71
71
end
72
72
end
73
- end
73
+ end
You can’t perform that action at this time.
0 commit comments