-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
file provisioner: add possibility to set content + tests #11209
Conversation
Thanks for the PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I left a small suggestion around the handling of the a file download, but this is otherwise good to go.
errors.New("source, sources or content must be specified.")) | ||
} | ||
|
||
if len(p.config.Sources) > 0 && p.config.Content != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to error if a user is trying to use direction "download" along with the new content field. Or maybe just provide a warning to the user that "content" will be ignored when downloading a file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ehm, good question, yeah, it's probably a problem to do that, because it will basically create a file locally with content
but at the same time if a user would be using that option, then they probably know what they are doing 🤔 . Because the default is alway to upload.
Let's leave it like this and if this turns out to be a problem, we can open a new PR to error there.
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
No description provided.