Skip to content

Commit

Permalink
Fixed an issue with string manipulation and quarto versions during th…
Browse files Browse the repository at this point in the history
…e download phase.
  • Loading branch information
samcofer committed May 21, 2024
1 parent 51e26d5 commit 40e3534
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/quarto/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"os"
"sort"
"strconv"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -138,9 +139,9 @@ func generateQuartoInstallURL(quartoVersion string, osType config.OperatingSyste
// treat RHEL 7 differently as specified here: https://docs.posit.co/resources/install-quarto/#specify-quarto-version-tar
var url string
if osType == config.Redhat7 {
url = fmt.Sprintf("https://github.com/quarto-dev/quarto-cli/releases/download/v%s/quarto-%s-linux-rhel7-amd64.tar.gz", quartoVersion, quartoVersion)
url = fmt.Sprintf("https://github.com/quarto-dev/quarto-cli/releases/download/%s/quarto-%s-linux-rhel7-amd64.tar.gz", quartoVersion, strings.Replace(quartoVersion, "v", "", -1))
} else {
url = fmt.Sprintf("https://github.com/quarto-dev/quarto-cli/releases/download/v%s/quarto-%s-linux-amd64.tar.gz", quartoVersion, quartoVersion)
url = fmt.Sprintf("https://github.com/quarto-dev/quarto-cli/releases/download/%s/quarto-%s-linux-amd64.tar.gz", quartoVersion, strings.Replace(quartoVersion, "v", "", -1))
}
return url
}
Expand Down

0 comments on commit 40e3534

Please sign in to comment.