mirror of
https://github.com/taigrr/wails.git
synced 2026-04-15 11:21:15 -07:00
fix: escape windows commands
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
)
|
||||
@@ -128,6 +129,11 @@ func (p *ProgramHelper) RunCommandArray(args []string, dir ...string) error {
|
||||
fmt.Printf("ERROR: Looks like '%s' isn't installed. Please install and try again.", program)
|
||||
return err
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
program = strings.ReplaceAll(program, ` `, `\ `)
|
||||
}
|
||||
|
||||
args = args[1:]
|
||||
var stderr string
|
||||
var stdout string
|
||||
|
||||
Reference in New Issue
Block a user