Browse Source
tinygo: detect GOOS=wasip1 for relative WASI paths via config instead of target name (#4423)
pull/4425/head
Randy Reddig
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
4 deletions
-
main.go
|
|
@ -305,13 +305,11 @@ func Test(pkgName string, stdout, stderr io.Writer, options *compileopts.Options |
|
|
|
//
|
|
|
|
// Ex. run --dir=.. --dir=../.. --dir=../../..
|
|
|
|
var dirs []string |
|
|
|
switch config.Options.Target { |
|
|
|
switch config.Target.GOOS { |
|
|
|
case "wasip1": |
|
|
|
dirs = dirsToModuleRootRel(result.MainDir, result.ModuleRoot) |
|
|
|
case "wasip2": |
|
|
|
dirs = dirsToModuleRootAbs(result.MainDir, result.ModuleRoot) |
|
|
|
default: |
|
|
|
return fmt.Errorf("unknown GOOS target: %v", config.Options.Target) |
|
|
|
dirs = dirsToModuleRootAbs(result.MainDir, result.ModuleRoot) |
|
|
|
} |
|
|
|
|
|
|
|
args := []string{"run"} |
|
|
|