5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-08 06:50:56 +08:00

trim gcc string

This commit is contained in:
Lea Anthony 2019-07-31 06:08:43 +10:00
parent e2105331c1
commit 5cb00eb481
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -51,16 +51,14 @@ To help you in this process, we will ask for some information, add Go/Wails deta
gcc := program.FindProgram("gcc")
if gcc != nil {
stdout, _, _, _ := gcc.Run("-dumpversion")
gccVersion = stdout
// TODO: check if linefeed needs stripping or what kind
// gccVersion = gccVersion[:len(gccVersion)-1]
gccVersion = strings.TrimSpace(stdout)
}
case "linux":
gcc := program.FindProgram("gcc")
if gcc != nil {
stdout, _, _, _ := gcc.Run("-dumpfullversion")
gccVersion = stdout
gccVersion, _, _, _ := gcc.Run("-dumpfullversion")
gccVersion = gccVersion[:len(gccVersion)-1]
gccVersion = strings.TrimSpace(gccVersion)
}
// TODO: windows support