We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
command
This affects OSH/YSH. Discovered due to a .NET package in my path with a tr directory for translations.
tr
osh-0.24.0$ which cat /usr/bin/cat osh-0.24.0$ command -v cat /usr/bin/cat osh-0.24.0$ = PATH => split(':')[0] (Str) '/home/will/.cargo/bin' osh-0.24.0$ mkdir ~/.cargo/bin/cat osh-0.24.0$ osh osh-0.24.0$ which cat /usr/bin/cat osh-0.24.0$ command -v cat /home/will/.cargo/bin/cat osh-0.24.0$ cat cat ^~~ [ interactive ]:3: Can't execute '/home/will/.cargo/bin/cat': Permission denied
The text was updated successfully, but these errors were encountered:
I think the issue is here. That should check for the executable mode bit and check that the file is a regular file. I can take a stab at this.
Sorry, something went wrong.
Oh yes! Thanks for noticing this
That code is for command -v I think, which does need to be changed
command -v
And then also executor.py LookupExecutable() needs to be changed
executor.py LookupExecutable()
I think that needs the same file check, regardless of exec_required ?
exec_required
I appreciate any help!
Also let me know if you need help with spec tests
For these it should be fairly satisfying. The tests start in a tempdir, so you can do
mkdir -p cat PATH=. cat
or something like that
And then you assert status and/or stdout
https://github.com/oils-for-unix/oils/wiki/Spec-Tests
I also use grep to navigate the code and tests, like
grep LookupExecutable */*.py
and
grep 'command -v' spec/*.test.sh
and so forth
There is a cheat sheet here - https://github.com/oils-for-unix/oils/wiki/Oil-Dev-Cheat-Sheet
No branches or pull requests
This affects OSH/YSH. Discovered due to a .NET package in my path with a
tr
directory for translations.The text was updated successfully, but these errors were encountered: