-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy: ApplyParams: rewrite with tempfile (#1178)
* deploy: ApplyParams: factor out params.env parsing Mostly refactoring, just factor out parsing code, but it closes the file after parsing. Signed-off-by: Yauheni Kaliuta <[email protected]> * deploy: ApplyParams: rewrite with tempfile Use traditional UNIX pattern of writing to a temporary file and renaming it to the original one instead of modifying inplace. Rename operation is atomic. It also fixes previous code for handling unclosed files on the filesystem (it used defer to close them on exit of the function). Addionally add comment in case of value replaced with environment. Signed-off-by: Yauheni Kaliuta <[email protected]> --------- Signed-off-by: Yauheni Kaliuta <[email protected]>
- Loading branch information
Showing
1 changed file
with
51 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters