Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b83f8037
Unverified
Commit
b83f8037
authored
Nov 21, 2024
by
Thomas Gleason
Committed by
GitHub
Nov 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow install script to print error on failed binary download (#11335)
Signed-off-by:
Thomas Gleason
<
tommatime@proton.me
>
parent
4fef6552
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
install.sh
install.sh
+14
-2
install.sh.sha256sum
install.sh.sha256sum
+1
-1
No files found.
install.sh
View file @
b83f8037
...
...
@@ -423,22 +423,34 @@ get_k3s_selinux_version() {
# --- download from github url ---
download
()
{
[
$#
-eq
2
]
||
fatal
'download needs exactly 2 arguments'
# Disable exit-on-error so we can do custom error messages on failure
set
+e
# Default to a failure status
status
=
1
case
$DOWNLOADER
in
curl
)
curl
-o
$1
-sfL
$2
status
=
$?
;;
wget
)
wget
-qO
$1
$2
status
=
$?
;;
*
)
# Enable exit-on-error for fatal to execute
set
-e
fatal
"Incorrect executable '
$DOWNLOADER
'"
;;
esac
# Abort if download command failed
[
$?
-eq
0
]
||
fatal
'Download failed'
# Re-enable exit-on-error
set
-e
# Abort if download command failed
[
$status
-eq
0
]
||
fatal
'Download failed'
}
# --- download hash from github url ---
...
...
install.sh.sha256sum
View file @
b83f8037
afacec791f66d92cec11880479c42b9e261912e0d97d3e3a3de21315b6ac49f3
install.sh
f49035378daf603b0dbd458efb4d50608d3499aab3b2e724384dfb5801153669
install.sh
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment