Fix install script to trim leading v from version

Updates #1746
This commit is contained in:
Anmol Sethi 2020-06-02 17:22:24 -04:00
parent b88163392c
commit 9a3b9fcac2
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB

View File

@ -62,7 +62,8 @@ EOF
echo_latest_version() {
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/cdr/code-server/releases/latest)"
version="${version#https://github.com/cdr/code-server/releases/tag/v}"
version="${version#https://github.com/cdr/code-server/releases/tag/}"
version="${version#v}"
echo "$version"
}