Megan Marsh
89b058604d
update tests for pull 5272
2017-08-22 14:20:40 -07:00
Luke Farnell
d9a5b69403
clean up ineffectual assignments
2017-08-07 13:20:01 -04:00
Matthew Hooker
81522dced0
move packer to hashicorp
2017-04-04 13:39:01 -07:00
DanHam
c88fafdf38
provisioner/powershell: align, fix and compact env var test
2017-01-23 12:10:46 +00:00
DanHam
80ebcea5e1
Mirror cleaner test code back from windows-shell to powershell
2017-01-19 13:33:59 +00:00
DanHam
be0196492f
Tests for env variables values starting with or containing an equals sign
2016-12-28 00:31:17 +00:00
Taliesin Sisson
f38d787b0e
Powershell uses UTF16Le for encodedCommand
2016-12-12 22:44:56 +00:00
Taliesin Sisson
e36051d394
Pattern for infrastructure changed to quote filename and execute file with ampersand as everything is run in powershell now
...
Handle powershell commands by specifying any extra infrastructure around running scripts inside of ExecuteCommand and ElevatedExecuteCommand
2016-12-12 22:44:55 +00:00
Taliesin Sisson
d61513bf77
Encode powershell using utf8
...
Fix a bug in the size of string that was returned when decoding a base64 string
Added tests around encoding and decoding powershell scripts. Used [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes('powershell commands')) | clip to generate what base 64 strings should look like
2016-12-12 22:44:54 +00:00
Taliesin Sisson
17597b48e1
Base64 encode powershell to avoid any necessary escaping
2016-12-12 22:44:54 +00:00
Taliesin Sisson
5d5809b27e
Make hiding of progress backward compatible with old versions of powershell
2016-12-12 22:44:48 +00:00
Taliesin Sisson
e8c2b49be8
Use correct quotation of variables
2016-12-12 22:44:34 +00:00
Taliesin Sisson
4b394c8563
Write output will put ouput from function, so we don't want to be getting line from output of function
...
Fix unit tests for not showing progress stream when using powershell
Ensure that progress stream does not get leaked into stdout
Using Write-Output instead of Write-Host since PS v5 now leaks the host stream to stderr
2016-12-12 22:44:33 +00:00
Taliesin Sisson
cd6213eb55
Seems like we do need to escape the double quote
2016-12-12 22:44:25 +00:00
Taliesin Sisson
15137310a7
Must escape string formatting for string fmt
2016-12-12 22:44:20 +00:00
Taliesin Sisson
5285a819dd
Quoting of powershell commands and associated tests
2016-12-12 22:44:19 +00:00
Taliesin Sisson
3051ea6633
Quote powershell so that it does not try to interpret command to be run
...
Get VName out of state. This allows template replacement to be run on vmname
2016-12-12 22:44:10 +00:00
Rickard von Essen
f17bd30070
Revert "Removed escaped quotes in non-elevated powershell invocation"
...
This reverts commit 1b186f1613
.
2016-10-26 21:12:11 +02:00
Simon Guest
1b186f1613
Removed escaped quotes in non-elevated powershell invocation
2016-03-20 20:28:08 -07:00
Mitchell Hashimoto
040ff0706d
provisioner/powershell
2015-06-14 11:01:28 -07:00