Skip to content

Commit

Permalink
Removing tests and debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
teddylear committed Jun 24, 2021
1 parent 4a72e60 commit e699b7b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 63 deletions.
5 changes: 0 additions & 5 deletions packer/cache.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package packer

import (
"fmt"
"os"
"path/filepath"
)
Expand All @@ -26,18 +25,14 @@ func CachePath(paths ...string) (path string, err error) {
os.MkdirAll(filepath.Dir(path), os.ModePerm)
}()
cacheDir := getDefaultCacheDir()
fmt.Println(fmt.Sprintf("cacheDir: %s", cacheDir))
if cd := os.Getenv("PACKER_CACHE_DIR"); cd != "" {
fmt.Println(fmt.Sprintf("cd: %s", cd))
cacheDir = cd
}

paths = append([]string{cacheDir}, paths...)
fmt.Println(fmt.Sprintf("paths: %s", paths))
result, err := filepath.Abs(filepath.Join(paths...))
if err != nil {
return "", err
}
fmt.Println(fmt.Sprintf("result: %s", result))
return result, err
}
2 changes: 0 additions & 2 deletions packer/cache_config_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
package packer

import (
"fmt"
"os"
"path/filepath"
)

func getDefaultCacheDir() string {
var defaultConfigFileDir string

fmt.Println("Hiting linux configuration")
if xdgConfigHome := os.Getenv("XDG_CONFIG_HOME"); xdgConfigHome != "" {
defaultConfigFileDir = xdgConfigHome
} else {
Expand Down
5 changes: 0 additions & 5 deletions packer/cache_config_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@

package packer

import (
"fmt"
)

const (
defaultConfigFile = "packer_cache"
)

func getDefaultCacheDir() string {
fmt.Println("Hiting windows configuration")
return defaultConfigFile
}
51 changes: 0 additions & 51 deletions packer/cache_test.go

This file was deleted.

0 comments on commit e699b7b

Please sign in to comment.