File tree Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,7 @@ func (s *OptionSet) ParseEnv(vs []EnvVar) error {
121
121
}
122
122
123
123
envVal , ok := envs [opt .Env ]
124
- // Currently, empty values are treated as if the environment variable is
125
- // unset. This behavior is technically not correct as there is now no
126
- // way for a user to change a Default value to an empty string from
127
- // the environment. Unfortunately, we have old configuration files
128
- // that rely on the faulty behavior.
129
- if ! ok || envVal == "" {
124
+ if ! ok {
130
125
continue
131
126
}
132
127
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ func TestOptionSet_ParseEnv(t *testing.T) {
97
97
require .EqualValues (t , "foo" , workspaceName )
98
98
})
99
99
100
- t .Run ("EmptyValue " , func (t * testing.T ) {
100
+ t .Run ("EmptyValueUnsets " , func (t * testing.T ) {
101
101
t .Parallel ()
102
102
103
103
var workspaceName clibase.String
@@ -116,6 +116,6 @@ func TestOptionSet_ParseEnv(t *testing.T) {
116
116
117
117
err = os .ParseEnv (clibase .ParseEnviron ([]string {"CODER_WORKSPACE_NAME=" }, "CODER_" ))
118
118
require .NoError (t , err )
119
- require .EqualValues (t , "defname " , workspaceName )
119
+ require .EqualValues (t , "" , workspaceName )
120
120
})
121
121
}
Original file line number Diff line number Diff line change 1
1
# Coder must be reachable from an external URL for users and workspaces to connect.
2
2
# e.g. https://coder.example.com
3
- CODER_ACCESS_URL =
3
+ # CODER_ACCESS_URL=
4
4
5
- CODER_ADDRESS =
6
- CODER_PG_CONNECTION_URL =
7
- CODER_TLS_CERT_FILE =
8
- CODER_TLS_ENABLE =
9
- CODER_TLS_KEY_FILE =
5
+ # CODER_ADDRESS=
6
+ # CODER_PG_CONNECTION_URL=
7
+ # CODER_TLS_CERT_FILE=
8
+ # CODER_TLS_ENABLE=
9
+ # CODER_TLS_KEY_FILE=
10
10
11
11
# Run "coder server --help" for flag information.
You can’t perform that action at this time.
0 commit comments