Skip to content
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

Apply --chmod before opening output file #841

Merged
merged 1 commit into from
May 14, 2020
Merged

Conversation

hairyhenderson
Copy link
Owner

If an output file already exists but is not able to be read or written by the user, gomplate will fail to open it even if the --chmod flag is given.

This is because the new mode is only applied after attempting to open the file.

This fixes that behaviour by applying the --chmod before opening the file.

Signed-off-by: Dave Henderson [email protected]

@hairyhenderson hairyhenderson merged commit 892e280 into master May 14, 2020
@hairyhenderson hairyhenderson deleted the chmod-out-first branch May 14, 2020 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant