File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package configuration
18
18
import (
19
19
"fmt"
20
20
"net/url"
21
+ "os"
21
22
"runtime"
22
23
23
24
"github.com/arduino/arduino-cli/cli/globals"
@@ -34,12 +35,18 @@ func UserAgent(settings *viper.Viper) string {
34
35
subComponent = " " + subComponent
35
36
}
36
37
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" ,
38
44
globals .VersionInfo .Application ,
39
45
globals .VersionInfo .VersionString ,
40
46
subComponent ,
41
47
runtime .GOARCH , runtime .GOOS , runtime .Version (),
42
- globals .VersionInfo .Commit )
48
+ globals .VersionInfo .Commit ,
49
+ extendedUA )
43
50
}
44
51
45
52
// NetworkProxy returns the proxy configuration (mainly used by HTTP clients)
You can’t perform that action at this time.
0 commit comments