winrm 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/changelog.md +3 -0
- data/lib/winrm/shells/power_shell.rb +1 -0
- data/lib/winrm/version.rb +1 -1
- data/tests/integration/powershell_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdb9bfd4d44bdc3e671be670a00a0a56a26d0225
|
4
|
+
data.tar.gz: 6f8dee428dbe911d59815d82c8cb26860047b3f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0d1bd52c2fa18fd41959bbf03ecc2d5c2339cb33efc651d1adb707bb813aa7ff4f7cc1c539d08f2379629ecad95d43d87a96351512896f6798bf921b2e0e117
|
7
|
+
data.tar.gz: 0f3bb047858ca2e1f3c8810f9073323c9d2daf67d05647d992a33b285e666d2e187620afaf8775cd0eadc9e5d7d187b10e4d921ac213426149e6c72ee938ad39
|
data/changelog.md
CHANGED
@@ -98,6 +98,7 @@ module WinRM
|
|
98
98
|
|
99
99
|
def send_command(command, _arguments)
|
100
100
|
command_id = SecureRandom.uuid.to_s.upcase
|
101
|
+
command += "\r\nif (!$?) { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } }"
|
101
102
|
message = PSRP::MessageFactory.create_pipeline_message(@runspace_id, command_id, command)
|
102
103
|
fragmenter.fragment(message) do |fragment|
|
103
104
|
command_args = [connection_opts, shell_id, command_id, fragment]
|
data/lib/winrm/version.rb
CHANGED
@@ -13,6 +13,11 @@ describe 'winrm client powershell' do
|
|
13
13
|
it { should have_no_stderr }
|
14
14
|
end
|
15
15
|
|
16
|
+
describe 'ipconfig with invalid args' do
|
17
|
+
subject(:output) { @powershell.run('ipconfig blah') }
|
18
|
+
it { should have_exit_code 1 }
|
19
|
+
end
|
20
|
+
|
16
21
|
describe 'throw' do
|
17
22
|
subject(:output) { @powershell.run("throw 'an error occured'") }
|
18
23
|
it { should have_exit_code 0 }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: winrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Wanek
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-09-
|
12
|
+
date: 2016-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gssapi
|