mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-18 03:18:52 -06:00
remove tmpfile if no diff changes present
Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
@@ -86,6 +86,10 @@ func writePatch(configPath string, yamlOutput []byte) error {
|
||||
cmd := exec.Command("diff", "-u", path.Join(configPath, configFilename), tmpFile)
|
||||
stdout, err := cmd.Output()
|
||||
if err == nil {
|
||||
err = os.Remove(tmpFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println("no changes, your config is up to date")
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user