diff --git a/src/syscall/file_emulated.go b/src/syscall/file_emulated.go index 0185965b..1fe1103b 100644 --- a/src/syscall/file_emulated.go +++ b/src/syscall/file_emulated.go @@ -1,4 +1,4 @@ -// +build baremetal wasi wasm +// +build baremetal wasm // This file emulates some file-related functions that are only available // under a real operating system. diff --git a/src/syscall/file_hosted.go b/src/syscall/file_hosted.go index a7df3549..45b657d1 100644 --- a/src/syscall/file_hosted.go +++ b/src/syscall/file_hosted.go @@ -1,4 +1,4 @@ -// +build !baremetal,!wasi,!wasm +// +build !baremetal,!wasm // This file assumes there is a libc available that runs on a real operating // system. diff --git a/testdata/filesystem.go b/testdata/filesystem.go index 5f41318e..1f561ba8 100644 --- a/testdata/filesystem.go +++ b/testdata/filesystem.go @@ -34,4 +34,12 @@ func main() { } os.Stdout.Write(data) + + path, err := os.Getwd() + if err != nil { + panic(err) + } + if path == "" { + panic("path is empty") + } }