Skip to content

Commit 7c2b591

Browse files
committed
fix
1 parent 1d3ee81 commit 7c2b591

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

util.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ func SplitCommand(cmd string) ([]string, error) {
6262
}
6363

6464
if buf.Len() != 0 {
65+
s := buf.String()
6566
if len(ss) == 0 {
66-
return []string{cmd}, nil
67+
return []string{s}, nil
6768
}
68-
ss = append(ss, buf.String())
69+
ss = append(ss, s)
6970
}
7071

7172
return ss, nil

util_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ b`,
113113
},
114114
want: []string{"a", "'b'"},
115115
},
116+
{
117+
args: args{
118+
cmd: "'a'",
119+
},
120+
want: []string{"a"},
121+
},
116122
}
117123
for _, tt := range tests {
118124
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)