File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
lib/puppet/provider/package Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
## Development
2
2
3
+ * Fixed bug in ` package ` where the ` source ` parameter was always inserted when checking for the
4
+ latest version of a module. (Bugfix) #13
5
+
3
6
## 2.1.1 (2020-10-27)
4
7
5
8
* Fixed bug where CDNs requiring TLSv1.2 caused an idempotency issue in ` psrepository ` on
Original file line number Diff line number Diff line change @@ -36,12 +36,12 @@ def uninstall
36
36
end
37
37
38
38
def latest
39
- result = self . class . invoke_ps_command latest_command
39
+ result = self . class . invoke_ps_command ( latest_command )
40
40
result [ 0 ] . strip
41
41
end
42
42
43
43
def update
44
- self . class . invoke_ps_command update_command
44
+ self . class . invoke_ps_command ( update_command )
45
45
end
46
46
47
47
# Turns a array of install_options into flags to be passed to a command.
@@ -101,7 +101,10 @@ def uninstall_command
101
101
102
102
# Command to fetch latest version of powershell modules
103
103
def latest_command
104
- "$mod = Find-Module #{ @resource [ :name ] } -Repository #{ @resource [ :source ] } ; $mod.Version.ToString()"
104
+ command = "$mod = Find-Module #{ @resource [ :name ] } "
105
+ command << " -Repository #{ @resource [ :source ] } " if @resource [ :source ]
106
+ command << '; $mod.Version.ToString()'
107
+ command
105
108
end
106
109
107
110
# Command to update powershell modules
You can’t perform that action at this time.
0 commit comments