added version to user-agent header so node downloads can identify old versions of NVM4W

This commit is contained in:
Corey Butler
2024-11-22 21:48:27 -06:00
parent 6f39389b3f
commit 096e0a20fc

View File

@@ -131,7 +131,7 @@ func Download(url string, target string, version string) bool {
}
// TODO: Add version to user agent
req.Header.Set("User-Agent", "NVM for Windows")
req.Header.Set("User-Agent", fmt.Sprintf("NVM for Windows %s", version))
response, err := client.Do(req)
if err != nil {