Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

Commit 60d8365

Browse files
committed
Enable overlay filesystems for webassembly
Skip statting for genned dirs on webassembly.
1 parent bce2f82 commit 60d8365

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/internal.go

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"fmt"
2525
"os"
2626
"path/filepath"
27+
"runtime"
2728
"strings"
2829

2930
"github.com/cockroachdb/apd/v2"
@@ -414,6 +415,9 @@ func IsEllipsis(x ast.Decl) bool {
414415

415416
// GenPath reports the directory in which to store generated files.
416417
func GenPath(root string) string {
418+
if runtime.GOOS == "js" {
419+
return filepath.Join(root, "cue.mod", "gen")
420+
}
417421
info, err := os.Stat(filepath.Join(root, "cue.mod"))
418422
if os.IsNotExist(err) || !info.IsDir() {
419423
// Try legacy pkgDir mode

0 commit comments

Comments
 (0)