Skip to content

Commit

Permalink
optimize exec
Browse files Browse the repository at this point in the history
  • Loading branch information
syyongx committed Apr 24, 2019
1 parent 71c6979 commit f0464b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions php.go
Original file line number Diff line number Diff line change
Expand Up @@ -1731,9 +1731,8 @@ func Exec(command string, output *[]string, returnVar *int) string {
})
// remove the " and ' on both sides
for i, v := range parts {
f := string(v[0])
l := len(v)
if l >= 2 && (f == "\"" || f == "'") {
f, l := v[0], len(v)
if l >= 2 && (f == '"' || f == '\'') {
parts[i] = v[1 : l-1]
}
}
Expand Down

0 comments on commit f0464b6

Please sign in to comment.