-
Notifications
You must be signed in to change notification settings - Fork 96
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
Issues 78 - Makes install.sh
more shellcheck compliant.
#81
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Potherca
changed the title
Issues 78 - Makes
[WIP] Issues 78 - Makes Apr 2, 2017
install.sh
more shellcheck compliant.install.sh
more shellcheck compliant.
Potherca
force-pushed
the
issue/78/code-quality
branch
from
April 3, 2017 08:10
23dc11a
to
5d08dc3
Compare
Potherca
force-pushed
the
issue/78/code-quality
branch
from
April 3, 2017 09:28
de0e0b5
to
d8cebd2
Compare
Potherca
changed the title
[WIP] Issues 78 - Makes
Issues 78 - Makes Apr 3, 2017
install.sh
more shellcheck compliant.install.sh
more shellcheck compliant.
Closed
jwerle
approved these changes
Apr 3, 2017
@Potherca thank you for this! |
Is this PR safe to merge in? Do you have anything else you'd like to add to it? |
I didn't feel too sure about the "gurl" curl wrapper so I cleaned that up by having two variations per function (wrapper) using Everything should be good to merge now. |
@Potherca awesome thanks!! |
This was referenced Jan 19, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduction
I was thinking about taking a stab at #53 but decided to make the relevant file more shellcheck compliant first (as suggested in issue #78).
Suggested Changes
Shellcheck Fixes
All occurrences of the following issues have been resolved:
Other issues
Whilst resolving shellcheck issues, I ran into two problems.
curl "${auth_param}"
caused trouble whenauth_param
is empty (=''
). This did not happen when there were no quotes aroundauth_param
, that is to say, things accidentally worked.To resolve this I added a wrapper for the three use-cases around curl with a check and two variations of calling curl (one with and one without
auth_param
.-o /dev/null
will fail with a write error (curl error 23). However, failure to write to/dev/null
is not an issue, as the HTTP status code is still viable. To resolve this I added a separate function for the "check url exists" logic and added the check there.If these two solutions do not cause any trouble, I do believe they are worth keeping as they are a good first step in de-duplicating some of the curl calls.
Work for later
The following shellcheck issues are still present as I am unsure as how to resolve them:
I would suggest fixing those issues in a separate PR to keep things moving.
I'll continue work on #53 on a separate branch and open a PR once this has been merged to
master
.