Skip to content

Commit

Permalink
Delete any existing read-only file
Browse files Browse the repository at this point in the history
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
  • Loading branch information
afbjorklund committed Sep 22, 2024
1 parent 2b64f45 commit dc1c3e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/cidata/cidata.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ func GenerateCloudConfig(instDir, name string, y *limayaml.LimaYAML) error {
return err
}

os.RemoveAll(filepath.Join(instDir, filenames.CloudConfig)) // delete existing
return os.WriteFile(filepath.Join(instDir, filenames.CloudConfig), config, 0o444)
}

Expand Down

0 comments on commit dc1c3e3

Please sign in to comment.