From e430809cdd42f288db7329bc51954f5cf24bd8da Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 12 Feb 2020 10:21:20 -0800 Subject: [PATCH] Update exit code value used for retry check - ArgumentException --- plugins/communicators/winrm/shell.rb | 2 +- test/unit/plugins/communicators/winrm/shell_test.rb | 2 +- vagrant.gemspec | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/communicators/winrm/shell.rb b/plugins/communicators/winrm/shell.rb index 61d09475c..9b0cf66d1 100644 --- a/plugins/communicators/winrm/shell.rb +++ b/plugins/communicators/winrm/shell.rb @@ -19,7 +19,7 @@ module VagrantPlugins # Exit code generated when user is invalid. Can occur # after a hostname update - INVALID_USERID_EXITCODE = -196608 + INVALID_USERID_EXITCODE = -2147024809 # These are the exceptions that we retry because they represent # errors that are generally fixed from a retry and don't diff --git a/test/unit/plugins/communicators/winrm/shell_test.rb b/test/unit/plugins/communicators/winrm/shell_test.rb index 57874160d..2e05fb507 100644 --- a/test/unit/plugins/communicators/winrm/shell_test.rb +++ b/test/unit/plugins/communicators/winrm/shell_test.rb @@ -103,7 +103,7 @@ describe VagrantPlugins::CommunicatorWinRM::WinRMShell do let(:eusername) { double("elevatedusername") } let(:username) { double("username") } let(:failed_output) { WinRM::Output.new.tap { |out| - out.exitcode = -196608 + out.exitcode = described_class.const_get(:INVALID_USERID_EXITCODE) out << {stderr: "(10,8):UserId:"} out << {stderr: "At line:72 char:1"} } } diff --git a/vagrant.gemspec b/vagrant.gemspec index baae3f486..80439f696 100644 --- a/vagrant.gemspec +++ b/vagrant.gemspec @@ -28,11 +28,11 @@ Gem::Specification.new do |s| s.add_dependency "net-scp", "~> 1.2.0" s.add_dependency "rb-kqueue", "~> 0.2.0" s.add_dependency "rest-client", ">= 1.6.0", "< 3.0" - s.add_dependency "rubyzip", "~> 1.3" + s.add_dependency "rubyzip", "~> 2.0" s.add_dependency "wdm", "~> 0.1.0" - s.add_dependency "winrm", "~> 2.1" - s.add_dependency "winrm-fs", "~> 1.0" - s.add_dependency "winrm-elevated", "~> 1.1" + s.add_dependency "winrm", ">= 2.3.4", "< 3.0" + s.add_dependency "winrm-fs", ">= 1.3.4", "< 2.0" + s.add_dependency "winrm-elevated", ">= 1.2.1", "< 2.0" s.add_dependency "vagrant_cloud", "~> 2.0.3" # NOTE: The ruby_dep gem is an implicit dependency from the listen gem. Later versions