Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ec19d1

Browse files
Use curl to get a progress bar for download (#6)
1 parent f33e9d0 commit 3ec19d1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

gh-codeql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ function download() {
108108
tempdir="$(mktemp -d "$rootdir/dist/$channel/temp_$version.XXXXXXXX")"
109109
trap 'rm -rf "$tempdir"' EXIT
110110
echo "Downloading CodeQL CLI version $version..."
111-
gh release download -R "$repo" "$version" --pattern "codeql-$platform.zip" --dir "$tempdir"
111+
curl -L -o "$tempdir/codeql-$platform.zip" "https://github.com/$repo/releases/download/$version/codeql-$platform.zip"
112+
# The below is neater but cannot be made to display a progress bar at the moment:
113+
# gh release download -R "$repo" "$version" --pattern "codeql-$platform.zip" --dir "$tempdir"
112114
echo "Unpacking CodeQL CLI version $version..."
113115
unzip -oq "$tempdir/codeql-$platform.zip" -d "$tempdir"
114116
mv "$tempdir/codeql" "$rootdir/dist/$channel/$version"

0 commit comments

Comments
 (0)