Fix for pihole -w --nuke displaying help info even if command is exec… #3349
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By submitting this pull request, I confirm the following:
please fill any appropriate checkboxes, e.g: [X]
git rebase
)What does this PR aim to accomplish?:
In the latest release version (5.0), doing a
pihole -w --nuke
to nuke the whitelist works, but the standard syntax help information was still displayed (the output you get when you dopihole -w --help
).This gives the user the impression that the syntax was wrong and the nuke did not go through. This could be confusing.
example:
This PR rectifies this behaviour
How does this PR accomplish the above?:
By making sure the call to NukeList() exits, like any other function in the same module. (For example, Displaylist() )
Possible additional improvement is to output the exit code of the sqlite3 command, but that's not done in other functions here, so I left that out.
What documentation changes (if any) are needed to support this PR?:
None.