mirror of
https://github.com/ko-build/ko.git
synced 2025-03-17 20:47:51 +02:00
Fix regression in adding /ko-app to PATH (#448)
This commit is contained in:
parent
5a8663b58d
commit
2adcadd918
@ -742,7 +742,8 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl
|
||||
},
|
||||
})
|
||||
|
||||
appPath := path.Join("/ko-app", appFilename(ref.Path()))
|
||||
appDir := "/ko-app"
|
||||
appPath := path.Join(appDir, appFilename(ref.Path()))
|
||||
|
||||
// Construct a tarball with the binary and produce a layer.
|
||||
binaryLayerBuf, err := tarBinary(appPath, file, v1.Time{}, platform)
|
||||
@ -788,7 +789,7 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl
|
||||
updatePath(cfg, `C:\ko-app`)
|
||||
cfg.Config.Env = append(cfg.Config.Env, `KO_DATA_PATH=C:\var\run\ko`)
|
||||
} else {
|
||||
updatePath(cfg, appPath)
|
||||
updatePath(cfg, appDir)
|
||||
cfg.Config.Env = append(cfg.Config.Env, "KO_DATA_PATH="+kodataRoot)
|
||||
}
|
||||
cfg.Author = "github.com/google/ko"
|
||||
|
@ -536,7 +536,7 @@ func validateImage(t *testing.T, img v1.Image, baseLayers int64, creationTime v1
|
||||
pathValue := strings.TrimPrefix(envVar, "PATH=")
|
||||
pathEntries := strings.Split(pathValue, ":")
|
||||
for _, pathEntry := range pathEntries {
|
||||
if pathEntry == "/ko-app/test" {
|
||||
if pathEntry == "/ko-app" {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user