Skip to content

Commit

Permalink
fix: download url join (#273)
Browse files Browse the repository at this point in the history
Signed-off-by: Toma Puljak <[email protected]>
  • Loading branch information
Tpuljak authored Mar 22, 2024
1 parent 3ba1dde commit c6f44ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/server/api/controllers/binary/binaries.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package binary
import (
"fmt"
"net/http"
"net/url"
"os"
"path"
"path/filepath"
"strings"

Expand Down Expand Up @@ -61,7 +61,10 @@ func getBinaryPath(binaryName, binaryVersion string) (string, error) {
return binaryPath, nil
}

downloadUrl := path.Join(c.RegistryUrl, binaryVersion, binaryName)
downloadUrl, err := url.JoinPath(c.RegistryUrl, binaryVersion, binaryName)
if err != nil {
return "", err
}

err = daytona_os.DownloadFile(downloadUrl, binaryPath)
if err != nil {
Expand Down

0 comments on commit c6f44ca

Please sign in to comment.