@@ -186,13 +186,9 @@ func (cmd *envCommand) getNewEnvRef(
186
186
cmd .envNameFlag , args = args [0 ], args [1 :]
187
187
}
188
188
189
- ref , isRelative := cmd .getEnvRef (cmd .envNameFlag , nil )
189
+ ref , _ := cmd .getEnvRef (cmd .envNameFlag , nil )
190
190
191
191
if ! ref .hasAmbiguousPath {
192
- if ! strings .Contains (cmd .envNameFlag , "/" ) && ! isRelative {
193
- cmd .printDeprecatedNameMessage (cmd .envNameFlag , ref )
194
- }
195
-
196
192
return ref , args , nil
197
193
}
198
194
@@ -226,7 +222,6 @@ func (cmd *envCommand) getNewEnvRef(
226
222
}
227
223
228
224
if ! existsProject && existsLegacyPath {
229
- cmd .printDeprecatedNameMessage (cmd .envNameFlag , legacyRef )
230
225
return legacyRef , args , nil
231
226
}
232
227
@@ -256,13 +251,9 @@ func (cmd *envCommand) getExistingEnvRefWithRelative(
256
251
refString string ,
257
252
rel * environmentRef ,
258
253
) (environmentRef , error ) {
259
- ref , isRelative := cmd .getEnvRef (refString , rel )
254
+ ref , _ := cmd .getEnvRef (refString , rel )
260
255
261
256
if ! ref .hasAmbiguousPath {
262
- if ! strings .Contains (refString , "/" ) && ! isRelative {
263
- cmd .printDeprecatedNameMessage (refString , ref )
264
- }
265
-
266
257
return ref , nil
267
258
}
268
259
@@ -295,7 +286,6 @@ func (cmd *envCommand) getExistingEnvRefWithRelative(
295
286
}
296
287
297
288
if existsLegacyPath {
298
- cmd .printDeprecatedNameMessage (refString , legacyRef )
299
289
return legacyRef , nil
300
290
}
301
291
@@ -399,10 +389,3 @@ func (cmd *envCommand) writePropertyEnvironmentDiagnostics(out io.Writer, diags
399
389
400
390
return nil
401
391
}
402
-
403
- func (cmd * envCommand ) printDeprecatedNameMessage (name string , ref environmentRef ) {
404
- msg := fmt .Sprintf (
405
- "%sWarning: Referring to an environment name ('%s') without a project is deprecated.\n Please use '%s/%s' or '%s' instead.%s" ,
406
- colors .SpecWarning , name , ref .orgName , ref .Id (), ref .Id (), colors .Reset )
407
- fmt .Fprintln (cmd .esc .stderr , cmd .esc .colors .Colorize (msg ))
408
- }
0 commit comments