Variable expansion bug.
This commit is contained in:
parent
8cbbe9c53c
commit
587bdd6c63
8 changed files with 99 additions and 79 deletions
|
|
@ -152,7 +152,7 @@ func subprocess(program string,
|
|||
var outbytes []byte
|
||||
outbytes, err = cmd.Output()
|
||||
output = string(outbytes)
|
||||
if output[len(output)-1] == '\n' {
|
||||
if len(output) > 0 && output[len(output)-1] == '\n' {
|
||||
output = output[:len(output)-1]
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue