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:
committed by
Halvard Skogsrud
parent
8135bf22e9
commit
73a4629033
@ -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)
|
||||
|
Reference in New Issue
Block a user