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
sys::exec_wait("command", "-v", "foo")
Don't know if this is expected behavior, edge case, or my own wrong usage.
> out <- system2("command", "-v", "nix-build") > sys::exec_wait("command", "-v", "nix-build") Error: Failed to execute 'command' (No such file or directory) > out [1] 0
The text was updated successfully, but these errors were encountered:
sys runs programs, but maybe on your system, command is not an executable, but a shell-built-in:
command
See: https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html
In this case you need to invoke your shell program to use that command, which is what system2 does:
system2
sys::exec_wait("sh", c("-c", "command -v nix-build"))
If you just want to test if a program exists on the path, you can also use:
Sys.which("nix-build")
Sorry, something went wrong.
thank you so much for explaining!
No branches or pull requests
Don't know if this is expected behavior, edge case, or my own wrong usage.
The text was updated successfully, but these errors were encountered: