File tree Expand file tree Collapse file tree 7 files changed +11
-15
lines changed Expand file tree Collapse file tree 7 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
"syscall"
11
11
12
12
"github.com/pkg/errors"
13
+
13
14
"go.jetpack.io/devbox/internal/debug"
14
15
)
15
16
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ package env
5
5
6
6
const (
7
7
DevboxCache = "DEVBOX_CACHE"
8
- DevboxCLICloudShell = "DEVBOX_CLI_CLOUD_SHELL"
8
+ devboxCLICloudShell = "DEVBOX_CLI_CLOUD_SHELL"
9
9
DevboxDebug = "DEVBOX_DEBUG"
10
10
DevboxFeaturePrefix = "DEVBOX_FEATURE_"
11
11
DevboxGateway = "DEVBOX_GATEWAY"
@@ -16,14 +16,10 @@ const (
16
16
DevboxShellStartTime = "DEVBOX_SHELL_START_TIME"
17
17
DevboxVM = "DEVBOX_VM"
18
18
19
- DoNotTrack = "DO_NOT_TRACK"
20
-
21
19
LauncherVersion = "LAUNCHER_VERSION"
22
20
23
21
SSHTTY = "SSH_TTY"
24
22
25
- StartWebTerminal = "START_WEB_TERMINAL"
26
-
27
23
XDGDataHome = "XDG_DATA_HOME"
28
24
XDGConfigHome = "XDG_CONFIG_HOME"
29
25
XDGCacheHome = "XDG_CACHE_HOME"
Original file line number Diff line number Diff line change 9
9
)
10
10
11
11
func IsCLICloudShell () bool {
12
- cliCloudShell , _ := strconv .ParseBool (os .Getenv (DevboxCLICloudShell ))
12
+ cliCloudShell , _ := strconv .ParseBool (os .Getenv (devboxCLICloudShell ))
13
13
return cliCloudShell
14
14
}
15
15
@@ -22,9 +22,9 @@ func IsDevboxShellEnabled() bool {
22
22
return inDevboxShell
23
23
}
24
24
25
- func NotTrack () bool {
25
+ func DoNotTrack () bool {
26
26
// https://consoledonottrack.com/
27
- doNotTrack , _ := strconv .ParseBool (os .Getenv (DoNotTrack ))
27
+ doNotTrack , _ := strconv .ParseBool (os .Getenv ("DO_NOT_TRACK" ))
28
28
return doNotTrack
29
29
}
30
30
@@ -33,13 +33,13 @@ func IsDevboxDebugEnabled() bool {
33
33
return enabled
34
34
}
35
35
36
- func NotUpgradeConfig () bool {
36
+ func DoNotUpgradeConfig () bool {
37
37
notUpgrade , _ := strconv .ParseBool (os .Getenv (DevboxDoNotUpgradeConfig ))
38
38
return notUpgrade
39
39
}
40
40
41
41
func IsInBrowser () bool { // TODO: a better name
42
- inBrowser , _ := strconv .ParseBool (os .Getenv (StartWebTerminal ))
42
+ inBrowser , _ := strconv .ParseBool (os .Getenv ("START_WEB_TERMINAL" ))
43
43
return inBrowser
44
44
}
45
45
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ func readConfigFromURL(url *url.URL) (*Config, error) {
88
88
}
89
89
90
90
func upgradeConfig (cfg * Config , absFilePath string ) error {
91
- if env .NotUpgradeConfig () {
91
+ if env .DoNotUpgradeConfig () {
92
92
return nil
93
93
}
94
94
if cfg .Nixpkgs .Commit == "" {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import (
15
15
// Formats for marshalling and unmarshalling a series of shell commands in a
16
16
// devbox config.
17
17
const (
18
- // CmdArray formats shell commands as an array of of strings.
18
+ // CmdArray formats shell commands as an array of strings.
19
19
CmdArray CmdFormat = iota
20
20
21
21
// CmdString formats shell commands as a single string.
@@ -46,7 +46,6 @@ type Commands struct {
46
46
// UnmarshalJSON will set MarshalAs automatically so that commands
47
47
// marshal back to their original format. The default zero-value
48
48
// formats them as an array.
49
- //
50
49
MarshalAs CmdFormat
51
50
Cmds []string
52
51
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ var started bool
50
50
51
51
// Start enables telemetry for the current program.
52
52
func Start (appName string ) {
53
- if started || env .NotTrack () {
53
+ if started || env .DoNotTrack () {
54
54
return
55
55
}
56
56
started = initSentry (appName )
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const (
20
20
func init () {
21
21
// TODO(gcurtis): clean this up so that Sentry and Segment use the same
22
22
// start/stop functions.
23
- if env .NotTrack () || build .TelemetryKey == "" {
23
+ if env .DoNotTrack () || build .TelemetryKey == "" {
24
24
return
25
25
}
26
26
enabled = true
You can’t perform that action at this time.
0 commit comments