Skip to content
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(search): fail out on no package #504

Merged
merged 2 commits into from
Mar 19, 2022
Merged

fix(search): fail out on no package #504

merged 2 commits into from
Mar 19, 2022

Conversation

Elsie19
Copy link
Member

@Elsie19 Elsie19 commented Feb 17, 2022

Purpose

Currently search.sh uses return instead of exit to signify a non existent package, but that doesn't work, which gives an exit code of zero instead of one.

Approach

Replace certain returns with exits

Checklist

  • I confirm that I have read the contributing guidelines, and this pull request is abiding by all the clauses stated in the guideline.

@wizard-28
Copy link
Member

I think we've discussed this 2 times prior, and I seem to have forgotten why we went with return.

@Elsie19
Copy link
Member Author

Elsie19 commented Feb 17, 2022

return is used for functions to give a return value, and exit exits a script. A return will do nothing if not in a function, which this PR fixes, by changing the offending returns to exits, so pacstall errors out with the correct exit code

@D-Brox D-Brox added the bash For the bash version of Pacstall label Feb 24, 2022
@Elsie19 Elsie19 added the release notes Something that is or should be mentioned in the release notes label Feb 24, 2022
misc/scripts/search.sh Show resolved Hide resolved
misc/scripts/search.sh Show resolved Hide resolved
misc/scripts/search.sh Show resolved Hide resolved
misc/scripts/search.sh Show resolved Hide resolved
@wizard-28
Copy link
Member

@henryws this is going stale.

@Elsie19
Copy link
Member Author

Elsie19 commented Mar 10, 2022

Give me one more week to finish this PR.

@Elsie19
Copy link
Member Author

Elsie19 commented Mar 12, 2022

@wizard-28 ready.

@wizard-28 wizard-28 merged commit 809540f into pacstall:develop Mar 19, 2022
@Elsie19 Elsie19 deleted the cmds_fail branch March 19, 2022 16:56
D-Brox pushed a commit that referenced this pull request Mar 1, 2023
* fix(search): fail out on no package

* fix(search): add exits where they should be

Former-commit-id: 809540f
D-Brox pushed a commit that referenced this pull request Mar 1, 2023
* fix(search): fail out on no package

* fix(search): add exits where they should be

Former-commit-id: fa30fc2935a1db260c1d9832175af6772b017d4a [formerly 809540f]
Former-commit-id: 263ede9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bash For the bash version of Pacstall release notes Something that is or should be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants