cargo-deb icon indicating copy to clipboard operation
cargo-deb copied to clipboard

Don't use sudo if running --install as root

Open evanjs opened this issue 3 years ago • 1 comments

I was recently debugging an issue with an application that utilizes cargo-deb. For a while, I was hung up on a simple I/O error: No such file or directory (os error 2).

Eventually... I navigated to the install_deb definition (again), and realized it uses sudo... which was not present on my test system.

I noticed this was discussed before, but did not seem to be implemented.

I think it might be helpful if we either implement the linked solution, and if not, notify the user that sudo was the file that was not found.

cc @clarfonthey who requested the initial change and @kornelski who implemented it.

evanjs avatar Sep 11 '20 21:09 evanjs

Yeah, that's a good idea. Can you make a PR?

kornelski avatar Sep 14 '20 14:09 kornelski