File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package configuration
1818import (
1919 "fmt"
2020 "net/url"
21+ "os"
2122 "runtime"
2223
2324 "github.com/arduino/arduino-cli/cli/globals"
@@ -34,12 +35,18 @@ func UserAgent(settings *viper.Viper) string {
3435 subComponent = " " + subComponent
3536 }
3637
37- return fmt .Sprintf ("%s/%s%s (%s; %s; %s) Commit:%s" ,
38+ extendedUA := os .Getenv ("ARDUINO_CLI_USER_AGENT_EXTENSION" )
39+ if extendedUA != "" {
40+ extendedUA = " " + extendedUA
41+ }
42+
43+ return fmt .Sprintf ("%s/%s%s (%s; %s; %s) Commit:%s%s" ,
3844 globals .VersionInfo .Application ,
3945 globals .VersionInfo .VersionString ,
4046 subComponent ,
4147 runtime .GOARCH , runtime .GOOS , runtime .Version (),
42- globals .VersionInfo .Commit )
48+ globals .VersionInfo .Commit ,
49+ extendedUA )
4350}
4451
4552// NetworkProxy returns the proxy configuration (mainly used by HTTP clients)
You can’t perform that action at this time.
0 commit comments