Skip to content

Commit a2e5a5a

Browse files
committed
Detect windowsgui
1 parent bf2ff27 commit a2e5a5a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jpegli_wazero.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,10 @@ func initialize() {
368368

369369
wasi_snapshot_preview1.MustInstantiate(ctx, rt)
370370

371-
mc = wazero.NewModuleConfig().WithStderr(os.Stderr).WithStdout(os.Stdout)
372371
if runtime.GOOS == "windows" && isWindowsGUI() {
373-
mc = wazero.NewModuleConfig()
372+
mc = wazero.NewModuleConfig().WithStderr(io.Discard).WithStdout(io.Discard)
373+
} else {
374+
mc = wazero.NewModuleConfig().WithStderr(os.Stderr).WithStdout(os.Stdout)
374375
}
375376
}
376377

0 commit comments

Comments
 (0)