Skip to content

Commit

Permalink
Remove track_path attribute and make path tracking always on
Browse files Browse the repository at this point in the history
  • Loading branch information
byrney committed Nov 15, 2015
1 parent 2a4a22e commit 5fff938
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Expand Up @@ -3,8 +3,7 @@
### v0.5.2 (2015-11-14)

* Path Tracking. Tracking additions to the user and machine
%PATH% environment and merging them into the current process. To get the old
behaviour add a `track_path false` attribute to the chocolatey resource
%PATH% environment and merging them into the current process.

### v0.5.1 (2015-11-10)

Expand Down
2 changes: 0 additions & 2 deletions README.md
Expand Up @@ -62,7 +62,6 @@ Attribute | Description | Type | Default
- version: The version of the package to use.
- args: arguments to the installation.
- options: Hash of additional options to be sent to `choco.exe`
- track_path: Track changes to the %PATH% made by the package (default true)

# Examples

Expand All @@ -81,7 +80,6 @@ end

chocolatey 'git.install' do
options ({ 'params' => "'/GitOnlyOnPath'" })
track_path true
end

chocolatey 'wireshark' do
Expand Down
3 changes: 1 addition & 2 deletions providers/default.rb
Expand Up @@ -35,7 +35,6 @@ def load_current_resource # rubocop:disable Metrics/AbcSize
@current_resource.args(@new_resource.args)
@current_resource.options(@new_resource.options)
@current_resource.package(@new_resource.package)
@current_resource.track_path(@new_resource.track_path)
@current_resource.exists = package_exists?(@current_resource.package, @current_resource.version)
# @current_resource.installed = true if package_installed?(@current_resource.package)
end
Expand All @@ -50,7 +49,7 @@ def load_current_resource # rubocop:disable Metrics/AbcSize
else
install(@current_resource.package)
end
@current_resource.track_path && adjust_path(@current_resource.package)
adjust_path(@current_resource.package)
end

def adjust_path(name)
Expand Down
1 change: 0 additions & 1 deletion resources/default.rb
Expand Up @@ -5,7 +5,6 @@
attribute :version, :kind_of => String
attribute :args, :kind_of => String
attribute :options, :kind_of => Hash, :default => {}
attribute :track_path, :kind_of => [TrueClass, FalseClass], :default => true

def initialize(*args)
super
Expand Down

0 comments on commit 5fff938

Please sign in to comment.