Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

close #29, Exit status is not being respected in exec methods#60

Closed
hollyhuiLi wants to merge 2 commits intophp:masterfrom
hollyhuiLi:master
Closed

close #29, Exit status is not being respected in exec methods#60
hollyhuiLi wants to merge 2 commits intophp:masterfrom
hollyhuiLi:master

Conversation

@hollyhuiLi
Copy link
Contributor

close #29

@cmb69
Copy link
Member

cmb69 commented Aug 12, 2019

Thanks @hollyhuiLi! Could you please also fix the actual problem right away:

ExecOutput op = host.execOut("cmd /c powershell -Command \"if ($(Get-NetFirewallRule -DisplayName '"+ rule + "')) {echo 'found'} else { echo 'not found' }\" 2>nul", AHost.TEN_MINUTES);
// Check if rule exists for file, if not add it
// TODO: Adjust to use exit status, but have to figure out why java overwrites status code.
if(op.output.contains("not found")) {

Also, is the change to .gitignore related to this issue? If not, I suggest to submit a separate PR for it.

@hollyhuiLi
Copy link
Contributor Author

Fixed the original problem.
The .gitignore change is just used to ignore anything under work folder which is convenient for local debugging. No harm to take with any change.

@php-pulls
Copy link

Comment on behalf of cmb at php.net:

Great, thanks! Applied as 61f3977.

I've applied the .gitignore change as separate commit (260bd89).

@php-pulls php-pulls closed this Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exit status is not being respected in exec methods

3 participants