1
0

fix: always update containerfile if it is to build

This commit is contained in:
dump_stack() 2023-05-26 14:22:14 +00:00
parent 92f95d8658
commit 603f1c3654
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -216,13 +216,13 @@ func (c Container) Build(image string, envs, runs []string) (err error) {
return
}
err = os.WriteFile(cfile, []byte(cf), os.ModePerm)
if err != nil {
return
}
if c.Exist() {
c.Log.Info().Msg("update")
err = os.WriteFile(cfile, []byte(cf), os.ModePerm)
if err != nil {
return
}
} else {
c.Log.Info().Msg("build")
}