mirror of
https://git.sr.ht/~eliasnaur/gio-cmd
synced 2026-07-01 07:35:37 +00:00
gogio: fix #633 wasm_exec.js location for go1.24
Signed-off-by: Thomas Bruyelle <thomas.bruyelle@gmail.com>
This commit is contained in:
committed by
Elias Naur
parent
03a1ada8ac
commit
37612f9112
+7
-2
@@ -78,9 +78,14 @@ func buildJS(bi *buildInfo) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
wasmJS := filepath.Join(goroot, "misc", "wasm", "wasm_exec.js")
|
||||
// Location of the wasm_exec.js for go>=1.24
|
||||
wasmJS := filepath.Join(goroot, "lib", "wasm", "wasm_exec.js")
|
||||
if _, err := os.Stat(wasmJS); err != nil {
|
||||
return fmt.Errorf("failed to find $GOROOT/misc/wasm/wasm_exec.js driver: %v", err)
|
||||
// Location of the wasm_exec.js for go<1.24
|
||||
wasmJS = filepath.Join(goroot, "misc", "wasm", "wasm_exec.js")
|
||||
if _, err := os.Stat(wasmJS); err != nil {
|
||||
return fmt.Errorf("failed to find $GOROOT/misc/wasm/wasm_exec.js driver: %v", err)
|
||||
}
|
||||
}
|
||||
pkgs, err := packages.Load(&packages.Config{
|
||||
Mode: packages.NeedName | packages.NeedFiles | packages.NeedImports | packages.NeedDeps,
|
||||
|
||||
Reference in New Issue
Block a user