holzschu / holzschu/a-shell

`which file` causes `WASI Exit error: 1`

Open
#1,017 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
3.9k
Forks
213
Avg merge
1m
Merged PRs (30d)
1

Description

## Summary

It seems that the `WASI Exit error: 1` error occurs when trying to use `which` to search for commands with the .wasm3 or .wasm extension.

This issue has a workaround (`which *.wasm3` or `which *.wasm`), so the impact is not so big.

## Environment

- a-Shell 2.0.1 (549)
- iPadOS 26.5 RC
- [dotfiles](https://github.com/kkebo/dotfiles)

## Prerequisites

- `pkg install which`
- `SHA256 (bin/which) = 6b1b6c1dd891f649f029c3c6ad10682b30b871fa4d9a691dd1a56d1c4a9a367f`

## Steps to reproduce

1. Run `which file` on a-Shell

## Expected behavior

```console
$ which file
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/file.wasm3
```

## Actual behavior

```console
$ which file
WASI Exit error: 1
```

```console
$ which file.wasm3
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/file.wasm3
$ which vim
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/vim
$ which ls
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/ls
$ ls $APPDIR/bin/*.wasm3
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/ctags.wasm3
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/file.wasm3
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/readtags.wasm3
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/tree.wasm3
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/xz.wasm3
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/xzdec.wasm3
$ which ctags
WASI Exit error: 1
$ which ctags.wasm3
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/ctags.wasm3
$ which tree
WASI Exit error: 1
$ which tree.wasm3
/private/var/containers/Bundle/Application/2AAF71F3-879D-4E1F-B957-6FD3D8A57AF6/a-Shell.app/bin/tree.wasm3
$ which sqlite3
WASI Exit error: 1
$ which sqlite3.wasm
/var/mobile/Containers/Data/Application/A815C40A-2EE6-4811-8189-B81411E696F0/Documents/bin/sqlite3.wasm
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.