-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chocolately can permanently corrupt the config file if an operation is interrupted #355
Comments
I'm thinking that the file should only be written to if it has changed - someone filed that as #364. |
And the write should be tighter, like a backup made and then a write. If the write is not successful, rename the backup. |
Atomic write (aka write to config.new and then move to config.xml) will help. |
I don't know why this happened. The file C:\ProgramData\chocolatey\config\chocolatey.config was empty. |
+1, also encountered this |
@GuillaumeSmaha deleting |
If someone interrupts a write out for the config file, it can permanently corrupt the config file and requires one to delete it and let choco recreate it on the next run. Instead write the updates to the config file to a new file and then copy it over the existing file. This makes for a more atomic change that has very little chance of being interrupted.
* stable: (GH-355) Write config to temp path first (maint) formatting
|
@BeezUPJohnny I think you are looking for #364 to plus one. |
If the
choco
process ends, the following error can occur whenever anychoco
command is run:And the file
chocolatey.config
is blank. It should not be possible for either of these to occur, unless the user manually clears the file.The text was updated successfully, but these errors were encountered: