-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
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
[fix] Postinstall error with rm /usr/bin/pulsar #228
Conversation
Since this is a shell (sh) file and not a bash file, rather than doing a `if [[ -f "" ]]` condition, we can just throw away the error if it doesn't exist A whole lot safer than using `-f/--force`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems legit.
Although if /usr/bin/pulsar
already exists and we get an error trying to rm
it, maybe we should print the error only in that case? So the "if exists then rm
" way could give that benefit.
Yeah, I bounced back and forth. I'm not necessarily sure if the postinstall has to continue to be a sh file over a bash file, but there's definitely a way to do the same IF check within sh if we wanted Actually, you've made me rethink this. I think I'm actually going to switch it over to the IF statement, because if the current user (for whatever reason) doesn't have access to delete that file, the redirection would chuck that error to the void |
On second thought, throwing all errors to the void would also throw permission issues to the void as well. So we'll just test for the file existence and echo a message if it isn't found
Man, that is quite annoying, renaming a branch which already has a PR, doesn't simply renamed the branch the PR is targeting - nah it deletes the whole thing |
We'll just remove the else statement for now, and if people report issues later, we can simply recreate it Co-authored-by: DeeDeeG <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for this! |
Redirect stderr to /dev/null
Since this is a shell (sh) file and not a bash file, rather than doing an
if [[ -f "" ]]
condition, we can just throw away the error if it doesn't existA whole lot safer than using
-f/--force
Should fix #215