This repository was archived by the owner on Mar 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -143,21 +143,21 @@ func getImage(imageName string) (pkgutil.Image, error) {
143
143
func getCacheDir (imageName string ) (string , error ) {
144
144
145
145
// First preference for cache is set at command line
146
- if cacheDir == "" {
147
-
148
- // second preference is environment
149
- cacheDir = os .Getenv (containerDiffEnvCacheDir )
150
- }
151
-
152
- // Third preference (default) is set at $HOME
153
- if cacheDir == "" {
154
- dir , err := homedir .Dir ()
155
- if err != nil {
156
- return "" , err
157
- } else {
158
- cacheDir = dir
159
- }
160
- }
146
+ if cacheDir == "" {
147
+
148
+ // second preference is environment
149
+ cacheDir = os .Getenv (containerDiffEnvCacheDir )
150
+ }
151
+
152
+ // Third preference (default) is set at $HOME
153
+ if cacheDir == "" {
154
+ dir , err := homedir .Dir ()
155
+ if err != nil {
156
+ return "" , err
157
+ } else {
158
+ cacheDir = dir
159
+ }
160
+ }
161
161
rootDir := filepath .Join (cacheDir , ".container-diff" , "cache" )
162
162
imageName = strings .Replace (imageName , string (os .PathSeparator ), "" , - 1 )
163
163
return filepath .Join (rootDir , filepath .Clean (imageName )), nil
You can’t perform that action at this time.
0 commit comments