@@ -10,14 +10,22 @@ import type { CResult } from '../../types.mts'
10
10
export async function getDefaultOrgSlug ( ) : Promise < CResult < string > > {
11
11
const defaultOrgResult = getConfigValueOrUndef ( 'defaultOrg' )
12
12
if ( defaultOrgResult ) {
13
- debugFn ( 'notice' , 'use: default org' , defaultOrgResult )
13
+ debugFn (
14
+ 'notice' ,
15
+ 'use: org from defaultOrg value of socket/settings local app data' ,
16
+ defaultOrgResult ,
17
+ )
14
18
return { ok : true , data : defaultOrgResult }
15
19
}
16
20
17
21
// Lazily access constants.ENV.SOCKET_CLI_ORG_SLUG.
18
22
const envOrgSlug = constants . ENV . SOCKET_CLI_ORG_SLUG
19
23
if ( envOrgSlug ) {
20
- debugFn ( 'notice' , 'use: org from environment variable' , envOrgSlug )
24
+ debugFn (
25
+ 'notice' ,
26
+ 'use: org from SOCKET_CLI_ORG_SLUG environment variable' ,
27
+ envOrgSlug ,
28
+ )
21
29
return { ok : true , data : envOrgSlug }
22
30
}
23
31
@@ -32,7 +40,7 @@ export async function getDefaultOrgSlug(): Promise<CResult<string>> {
32
40
return {
33
41
ok : false ,
34
42
message : 'Failed to establish identity' ,
35
- data : `API did not return any organization associated with the current API token. Unable to continue.` ,
43
+ data : `No organization associated with the API token. Unable to continue.` ,
36
44
}
37
45
}
38
46
@@ -41,11 +49,11 @@ export async function getDefaultOrgSlug(): Promise<CResult<string>> {
41
49
return {
42
50
ok : false ,
43
51
message : 'Failed to establish identity' ,
44
- data : `Was unable to determine the default organization for the current API token. Unable to continue.` ,
52
+ data : `Cannot determine the default organization for the API token. Unable to continue.` ,
45
53
}
46
54
}
47
55
48
- debugFn ( 'notice' , 'resolve: org' , slug )
56
+ debugFn ( 'notice' , 'resolve: org from API ' , slug )
49
57
50
58
return {
51
59
ok : true ,
0 commit comments