containers / build

another build tool for container images (archived, see https://github.com/rkt/rkt/issues/4024)
Apache License 2.0
342 stars 80 forks source link

lib/end: print a warning to run as root when permission denied #285

Closed cgonyeo closed 7 years ago

cgonyeo commented 7 years ago

When a subcommand attempts to grab a lock due to permission denied or end fails to delete something due to permission denied, a warning will now be printed advising the user to run the command as root.

Example:

derek@proton ~/go/src/github.com/containers/build> ./bin/acbuild end
you'll need to run this as a user with appropriate privileges
end: remove .acbuild/currentaci/rootfs/var/www/localhost/htdocs: permission denied

Fixes https://github.com/containers/build/issues/284

sanmai-NL commented 7 years ago

One nitpick, please make it say ‘a user with appropriate privileges’ not ‘root’.

cgonyeo commented 7 years ago

nitpick applied

cgonyeo commented 7 years ago

@lucab this should be good to go if you want to give it another pass