Skip to content
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

Adding support for linux/darwin for Powershell function #118

Closed
wants to merge 1 commit into from

Conversation

jpatigny
Copy link

@jpatigny jpatigny commented May 2, 2021

Issue : #117

process = "powershell.exe"
}
// Linux // MacOS
if runtime.GOOS == "linux" || runtime.GOOS == "darwin" {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I get the rationale here. The executable to launch is dependent on the target platform not the platform where the winrm client is running, or did I miss something ?

// Specify pwsh to run encoded command
process = "pwsh"
}
return process + " -EncodedCommand " + psCmd
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if you change the command, then you'll have at least to change the accompanying unit test in powershell_test.go.

@jpatigny
Copy link
Author

jpatigny commented May 3, 2021

Scratch that....you're right.

@jpatigny jpatigny closed this May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants