@@ -48,7 +48,8 @@ func NewCmdGoCache() *cobra.Command {
48
48
return err
49
49
}
50
50
51
- token , err := helpers .ResolveToken (ctx , token )
51
+ token := os .Getenv ("DEPOT_CACHE_TOKEN" )
52
+ token , err = helpers .ResolveToken (ctx , token )
52
53
if err != nil {
53
54
return err
54
55
}
@@ -66,7 +67,7 @@ func NewCmdGoCache() *cobra.Command {
66
67
flags .SortFlags = false
67
68
flags .BoolVarP (& verbose , "verbose" , "v" , false , "Print verbose output" )
68
69
flags .StringVar (& token , "token" , "" , "Depot token" )
69
- flags .StringVarP (& orgID , "organization" , "o" , "" , "Depot organization ID" )
70
+ flags .StringVarP (& orgID , "organization" , "o" , os . Getenv ( "DEPOT_ORG_ID" ) , "Depot organization ID" )
70
71
flags .StringVar (& dir , "dir" , defaultCacheDir (), "Directory to store cache files" )
71
72
72
73
return cmd
@@ -126,6 +127,10 @@ func NewCache(baseURL, orgID, token, dir string, verbose bool) *Cache {
126
127
}
127
128
128
129
func (p * Cache ) Run (ctx context.Context ) error {
130
+ if p .Verbose {
131
+ log .Printf ("using depot gocache" )
132
+ }
133
+
129
134
defer p .RemoteCache .Close ()
130
135
131
136
br := bufio .NewReader (os .Stdin )
0 commit comments