Skip to content

Commit

Permalink
Follow redirects for ktlint download (#3543)
Browse files Browse the repository at this point in the history
The github release page is redirecting, so follow the redirects. 

Good news, the uploading is working and the cipd package is created: https://chrome-infra-packages.appspot.com/p/flutter/ktlint/linux-amd64

Bad news, the uploaded ktlint file is empty because the curl is failing because we aren't following the redirect. 

Passing the `-L` to curl fixes this (I double checked that with `-L` passed locally, we download a working version of ktlint). Sorry, should have caught this in the original PR.
  • Loading branch information
gmackall authored Mar 4, 2024
1 parent 600f760 commit 7eae6dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cipd_packages/ktlint/tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ KTLINT_FILE_NAME=$(cat $DIR/../ktlint_metadata.txt | cut -d ',' -f 2)
# Create the package structure.
rm -rf $DIR/../build && mkdir -p $DIR/../build

curl https://github.com/pinterest/ktlint/releases/download/"$KTLINT_MAJOR_VERSION"/"$KTLINT_FILE_NAME" -o $DIR/../build/ktlint
curl -L https://github.com/pinterest/ktlint/releases/download/"$KTLINT_MAJOR_VERSION"/"$KTLINT_FILE_NAME" -o $DIR/../build/ktlint

0 comments on commit 7eae6dc

Please sign in to comment.