[#7116] exclude `syscall.Exec` for WASM
This commit is contained in:
parent
b8f18bd97d
commit
3ca6321907
|
|
@ -12,7 +12,6 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
|
|
@ -773,7 +772,7 @@ func (app *BaseApp) Restart() error {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return syscall.Exec(execPath, os.Args, os.Environ())
|
return exec(execPath, os.Args, os.Environ())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
//go:build !(js && wasm)
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import "syscall"
|
||||||
|
|
||||||
|
func exec(argv0 string, argv []string, envv []string) error {
|
||||||
|
return syscall.Exec(argv0, argv, envv)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
//go:build js && wasm
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
func exec(argv0 string, argv []string, envv []string) error {
|
||||||
|
return errors.ErrUnsupported
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue