1
0
mirror of https://github.com/ko-build/ko.git synced 2025-07-12 23:50:31 +02:00

Always clean Dir for packages.Load

This commit is contained in:
Jon Johnson
2021-12-16 11:21:02 -08:00
committed by Halvard Skogsrud
parent 8135bf22e9
commit 73a4629033
2 changed files with 8 additions and 8 deletions

View File

@ -180,8 +180,8 @@ func createBuildConfigMap(workingDirectory string, configs []build.Config) (map[
// local import paths, therefore add a "./" equivalent as a prefix to
// the constructured import path
localImportPath := fmt.Sprint(".", string(filepath.Separator), path)
dir := baseDir
if filepath.Clean(dir) == "." {
dir := filepath.Clean(baseDir)
if dir == "." {
dir = ""
}
pkgs, err := packages.Load(&packages.Config{Mode: packages.NeedName, Dir: dir}, localImportPath)