File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ const (
72
72
varDisableDirect = "disable-direct-connections"
73
73
varDisableNetworkTelemetry = "disable-network-telemetry"
74
74
75
- notLoggedInMessage = "You are not logged in. Try logging in using 'coder login <url>'."
75
+ notLoggedInMessage = "You are not logged in. Try logging in using '%s login <url>'."
76
76
77
77
envNoVersionCheck = "CODER_NO_VERSION_WARNING"
78
78
envNoFeatureWarning = "CODER_NO_FEATURE_WARNING"
@@ -534,7 +534,11 @@ func (r *RootCmd) InitClient(client *codersdk.Client) serpent.MiddlewareFunc {
534
534
rawURL , err := conf .URL ().Read ()
535
535
// If the configuration files are absent, the user is logged out
536
536
if os .IsNotExist (err ) {
537
- return xerrors .New (notLoggedInMessage )
537
+ binPath , err := os .Executable ()
538
+ if err != nil {
539
+ binPath = "coder"
540
+ }
541
+ return xerrors .Errorf (notLoggedInMessage , binPath )
538
542
}
539
543
if err != nil {
540
544
return err
You can’t perform that action at this time.
0 commit comments