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.
Signed-off-by: Richard Gee [email protected]
Description
This propagates a change that was initially made in arkade
(alexellis/arkade#685) after it was found
that sudo on CentOS9 was not able to find the new binary in the path
it uses by default. This led to a poor UX as the binary had been
installed but an error in running SUCCESS_CMD gave the impression
that the installation had failed. This change adds an explicit
path to SUCCESS_CMD so that it can be found when running through sudo
with a 'secure_path' set.
Also addressed is a future bug where ALIAS_NAME is set. $BINLOCATION was
only used once in the
ln
command which would lead to a future failurewhere ALIAS_NAME is set and the BINLOCATION was not /usr/local/bin.
Motivation and Context
Relates to get.sh script exists with non-zero exit code on CentOS arkade#683 and Fix get.sh for CentOS9 arkade#685 and specifically Fix get.sh for CentOS9 arkade#685 (comment)
How Has This Been Tested?
Since the original issue affected CentOS9 this was tested on CentOS9.
Using current script, noting
main: line 172: k3sup: command not found
:Using proposed change in the branch on my fork:
Types of changes
Checklist:
git commit -s