-
Notifications
You must be signed in to change notification settings - Fork 76
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
Specify -InputFormat None #6
Comments
I can't remember for the life of me how I personally came to that option beyond some script I ran jamming up for no good reason :) Overall, the temp file might be the better, than the script block approach I was originally thinking...Combine with the future planned eheredoc capability, and it might be ideal. On another similar note, I have come to a realization about erb templates (content function) and exec resources should be avoided. We rspec our puppet repo, say for determining if an erb is a valid ruby template. A script can't be valid code, and have embedded ruby.. So I modded our powershell scripts to all accept puppet values as command line parameters. Embedding ruby in powershell is a recipe for trouble... |
is this because the ERB syntax, e.g. |
Special meanings run both ways and not limited to PowerShell so if I want to rspec my puppet repo to ensure all erb templates are syntactically sound and all scripts are clean too erb and scripts become mutually exclusive. I thought I would then ditch content func and go to file func but file function is pmaster server side load into var. Scripts are hard to troubleshoot without being on endpoint except for easy ones. So I think file resource -> exec resource dependency is the right way... The heredoc idea becomes less needful since you now are dropping things into a file. I am not sure how args play into exec in new approach. |
Perhaps I need to try use cases... |
@rismoney suggested we specify
-InputFormat None
to ensure the powershell script doesn't block reading from stdin. Alternatively, write the script to a tempfile and use-file <path>
. See comment #5 (comment)The text was updated successfully, but these errors were encountered: