Hiya---I hope everyone is having a good one. When I try to use certain shell built-in commands (that I've confirmed exist in my shell) with std::process::Command
, I get various errors:
Running
std::process::Command::new(".").arg("some/source/file/path").output()
seems to return a permission IO error even if I run my rust program (via cargo) with sudo
Running
std::process::Command::new("command").args(&["-v", "ls"]).output()
seems to return a file not found IO error when I run my rust without sudo
So I guess this means the child process doesn't have sufficient permissions? Is this something I can work around? More importantly, how can I know what I'm working with or where to read more? I looked at the source for std::process
, but I remain, as always, blind to insight.