crohr / pkgr

Package any app into deb or rpm packages, using heroku buildpacks
http://crohr.me/pkgr/
MIT License
590 stars 66 forks source link

`usage` doesn't call `exit` #154

Closed dequbed closed 5 years ago

dequbed commented 5 years ago

In the CLI the generated usage shell-function does not call exit after printing the usage guide, so commands will continue to run.

If too little parameters are given to config:set this will call config_set with no parameters, resulting in the CLI running

sed -i -r "s/^\s*export\s+${key}.*$//g" $(_p "/etc/${APP_NAME}/conf.d")/*

but with an empty $key:

sed -i -r "s/^\s*export\s+.*$//g" $(_p "/etc/${APP_NAME}/conf.d")/*

which will whoops your entire config in one go. (It deletes every line that starts with export in every file)