Initial outline for Windows powershell support. #8
Open
RussellHaley wants to merge 4 commits intozserge:masterfrom
Open
Initial outline for Windows powershell support. #8RussellHaley wants to merge 4 commits intozserge:masterfrom
RussellHaley wants to merge 4 commits intozserge:masterfrom
Conversation
…new shell each execution, which is not ideal. TODO: figure out how to change shell once permenantly (or does it always create a new shell?). TODO: Sanitize quotes for powershell as per in-code comment.
Contributor
|
Hello
Regards, |
…hich is not lua freindly. My current solution is to script the command as verb__noun to replace the powershell verb-noun pattern using gsub. This works, but now we need a way of running managed assemblies from the command line. See pwr_sh.lua for the start of it. My idea is to pass a function instead of a string to sh.command(). upon execute, it will see it's a function and instead of appending arguments, pass the varargs in, and that gets added as the parameters.
Temporary fork note.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"This implementation creates a new shell each execution, which is not ideal. TODO: figure out how to change shell once permanently (or does it always create a new shell?). TODO: Sanitize quotes for powershell as per in-code comment."
Hi, this is a first shot at adding powershell support as well as multi-shell support. Not mentioned in the comment is I changed it to use a home directory rather than /tmp for security reasons. The override is the set_temp function.
This is largely untested ("ls ~" worked!), but I thought I'd create a pull to get comments on an initial change. It's much more utilitarian than your code. I couldn't call commands through the meta mechanism to get the temp file set up (because there's no temp file!) so I used my existing library to bootstrap.
Also, while debugging I noted it went into the chuck to use the filepipe because args.input was "" (blank) not nil so I added a check for that.
It's late, probably missed details. Talk soon.
Russ
p.s. I have no interest in adding cmd support. :-P