Fix profile updates and validate configuration before apply
This commit is contained in:
parent
b552ec49cb
commit
2bf14948d7
1 changed files with 372 additions and 12 deletions
|
|
@ -37,7 +37,7 @@ func writeFiles(p paths, files map[string]string) error {
|
|||
}
|
||||
for _, relative := range previous {
|
||||
if _, keep := files[relative]; !keep {
|
||||
if err := os.Remove(filepath.Join(p.units, relative)); err != nil {
|
||||
if err := os.Remove(filepath.Join(p.units, relative)); err != nil && !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue