11 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Dan Čermák
b1ba47c52c
Mock the PowerShell.executable method in more tests
On *nix systems we might not have powershell installed and then finding
powershell.exe or pwsh.exe fails in some tests. If we instead mock
self.executable to return "powershell", then the tests pass and don't cause any
side effects.
2021-04-30 09:37:20 +02:00
Chris Roberts
5967a23fa0 Support pwsh executable name for powershell
This updates the powershell detection to look for the `pwsh` executable
    and use it when the powershell executable is not available.
2021-04-28 12:45:48 -07:00
Liam Feid
d6ea67ac32 Test that the correct powershell executable is used for privileged commands 2020-07-29 12:19:41 +02:00
Brian Cain
e073153728
(#10099) Properly join commands from passed in array
Prior to this commit, the `Util::Powershell.execute_inline`
method didn't properly join the passed in command and instead attempted
to execute the array of strings. This commit updates that
behavior to join the command array prior to inserting it into the full
powershell command.
2018-08-14 09:30:11 -07:00
Chris Roberts
cdab45424e Clean up powershell tests and add test for full path check 2018-06-18 09:39:17 -07:00
Chris Roberts
ef4d431d36 Remove console resizing on powershell commands 2018-06-12 16:47:47 -07:00
Chris Roberts
bf7cd4fb0a Add test coverage for powershell module option 2018-06-12 12:32:04 -07:00
Chris Roberts
5e68c896cf Force types for testing 2018-05-30 15:42:04 -07:00
Chris Roberts
1be87662da Add missing test coverage for powershell util methods 2018-05-30 15:05:27 -07:00
Chris Roberts
90fa705a6d Make powershell version detection timeout configurable
Allows custom configuration of the powershell timeout and bumps
the default timeout from 10 seconds to 30 seconds.

Fixes #9629
2018-04-04 16:02:11 -07:00