-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
callRunner: Use PowerShell to run commands on Windows #3006
Conversation
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.
LGTM
can we merge this? I don't use windows so I have no idea, are we waiting for more tests on windows? |
For one, the TODO in the PR description still needs to be addressed. |
ef8bfb3
to
f806f30
Compare
I've tested it on windows and can confirm it works. As of the TODO: It would require quite bit of refactoring, but all in the same file, so I think it's doable. First we would have to extract a few functions:
This way TLDR: Extract: Changes in functions:
This way sanitization happens before converting to Powershell and without changes to the functionality of |
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.
Tested here and legendary is broken since my user name has spaces on it.
all commands are failing.
@CommandMC do you want to include this one on the next release? |
I sure wouldn't complain if this would end up in the next release The issue you mentioned should be resolved now. Sorry it took so long, somehow missed the review notification |
dead43a
to
c5ef092
Compare
@flavioislima can you confirm if the issue you had is resolved? |
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.
looks good now
PowerShell's `Start-Process` cmdlet & its `-Wait` parameter are used to wait for a process tree to exit. This means we can now accurately track the "Playing" status of games on Windows.
There's no need to do different things depending on whether the argument contains a space, we can just always use the "longer" triple-quote form
c5ef092
to
d3d39a1
Compare
PowerShell's
Start-Process
cmdlet & its-Wait
parameter are used to wait for a process tree to exit. This means we can now accurately track the "Playing" status of games on Windows.TODO:
commandParts
, hiding login tokens ingetRunnerCallWithoutCredentials
no longer works.Adding a check like
if (runnerPath === 'powershell')
should work, although I don't exactly like this solutionCloses #2046
Use the following Checklist if you have changed something on the Backend or Frontend: