gojs: backfills errno tests and updates links (#1110)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2023-02-09 12:38:22 -05:00
committed by GitHub
parent addd312dda
commit f18bb221c4
17 changed files with 338 additions and 144 deletions

View File

@@ -411,7 +411,7 @@ func (processChdir) invoke(ctx context.Context, mod api.Module, args ...interfac
path := args[0].(string)
if s, err := syscallStat(mod, path); err != nil {
return nil, mapJSError(err)
return nil, ToErrno(err)
} else if !s.isDir {
return nil, syscall.ENOTDIR
} else {