Skip to content

Commit

Permalink
imports: fix error message in unix builder
Browse files Browse the repository at this point in the history
Signed-off-by: Achille Roussel <[email protected]>
  • Loading branch information
achille-roussel committed Jun 26, 2023
1 parent 5fcd830 commit 67717ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions imports/builder_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"context"
"errors"
"fmt"
"strings"
"syscall"

"github.com/stealthrocket/wasi-go"
Expand Down Expand Up @@ -114,7 +113,7 @@ func (b *Builder) Instantiate(ctx context.Context, runtime wazero.Runtime) (ctxr
stdio.fd, err = dup(stdio.fd)
}
if err != nil {
return ctx, nil, fmt.Errorf("unable to create %s: %w", strings.TrimPrefix("/dev/", stdio.path), err)
return ctx, nil, fmt.Errorf("unable to open %s: %w", stdio.path, err)
}
rights := wasi.FileRights
if descriptor.IsATTY(stdio.fd) {
Expand Down

0 comments on commit 67717ce

Please sign in to comment.