diff options
author | Joshua Timberman <joshua@opscode.com> | 2012-07-11 13:04:11 -0700 |
---|---|---|
committer | Joshua Timberman <joshua@opscode.com> | 2012-07-11 13:04:11 -0700 |
commit | 2b9c3bbdb10e9e809d4fd3cbb5047c8c7a9737c9 (patch) | |
tree | ff01369d20b59f3dd4e2cecdda44fc3d87f535bd | |
parent | 2474490602c570156b79cd2c003d1412dff4d576 (diff) | |
parent | 0a679831f519afcbd9a51f405a548d658f45a597 (diff) | |
download | mixlib-shellout-2b9c3bbdb10e9e809d4fd3cbb5047c8c7a9737c9.tar.gz |
Merge pull request #3 from paulmooring/COOK-811
Added timeout option to windows_package lwrp
-rw-r--r-- | providers/package.rb | 2 | ||||
-rw-r--r-- | resources/package.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/providers/package.rb b/providers/package.rb index 54bb30c..7f88e3b 100644 --- a/providers/package.rb +++ b/providers/package.rb @@ -120,7 +120,7 @@ def install_package(name,version) Chef::Log.debug("Processing #{@new_resource} as a #{installer_type} installer.") install_args = [cached_file(@new_resource.source, @new_resource.checksum), expand_options(unattended_installation_flags), expand_options(@new_resource.options)] Chef::Log.info("Starting installation...this could take awhile.") - shell_out!(sprintf(install_command_template, *install_args), {:returns => [0,42,127]}) + shell_out!(sprintf(install_command_template, *install_args), {:timeout => @new_resource.timeout, :returns => [0,42,127]}) end def remove_package(name, version) diff --git a/resources/package.rb b/resources/package.rb index 9729d9b..97c73f1 100644 --- a/resources/package.rb +++ b/resources/package.rb @@ -26,6 +26,7 @@ attribute :version, :kind_of => String attribute :options, :kind_of => String attribute :installer_type, :kind_of => Symbol, :default => nil, :equal_to => [:msi, :inno, :nsis, :wise, :installshield, :custom] attribute :checksum, :kind_of => String +attribute :timeout, :kind_of => Integer, :default => 600 # TODO @@ -33,4 +34,4 @@ attribute :checksum, :kind_of => String #attribute :response_file # allow target dirtory of installation to be set -#attribute :target_dir
\ No newline at end of file +#attribute :target_dir |