Skip to content

Commit 5f5b54d

Browse files
authored
fetch-configlet: print success message (#689)
Before this commit, `fetch-configlet` produced no output on success: $ scripts/fetch-configlet $ echo $? 0 With this commit, it prints a message while downloading, and then prints the downloaded configlet version and its location: $ scripts/fetch-configlet Fetching configlet... Downloaded configlet 4.0.0-beta.7 to ./bin/configlet Closes: #459
1 parent 0be1889 commit 5f5b54d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/fetch-configlet

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ main() {
5959
return 1
6060
fi
6161

62+
echo "Fetching configlet..." >&2
6263
download_url="$(get_download_url)"
6364
output_path="${output_dir}/latest-configlet.${ext}"
6465
curl "${curlopts[@]}" --output "${output_path}" "${download_url}"
@@ -69,6 +70,15 @@ main() {
6970
esac
7071

7172
rm -f "${output_path}"
73+
74+
case "${os}" in
75+
windows*) executable_ext='.exe' ;;
76+
*) executable_ext='' ;;
77+
esac
78+
79+
configlet_path="${output_dir}/configlet${executable_ext}"
80+
configlet_version="$(${configlet_path} --version)"
81+
echo "Downloaded configlet ${configlet_version} to ${configlet_path}"
7282
}
7383

7484
main

0 commit comments

Comments
 (0)