Skip to content

Commit

Permalink
Bugfix: version absent on install for Forge mods
Browse files Browse the repository at this point in the history
Prior to this fix, the .r10k-deploy.json file wouldn't have a module
version in it on first install. It would be present after an upgrade or
other modification of an already-present module, just not the first time
the module was added to an environment.

After this commit, the .r10k-deploy.json file is correctly populated
with new-install Forge modules' version numbers.
  • Loading branch information
reidmv committed Sep 27, 2019
1 parent c3867e1 commit 4ff1038
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/r10k/module/forge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ def expected_version

# @return [String] The version of the currently installed module
def current_version
@metadata ? @metadata.version : nil
if insync?
(@metadata ||= @metadata_file.read).nil? ? nil : @metadata.version
else
nil
end
end

alias version current_version
Expand Down

0 comments on commit 4ff1038

Please sign in to comment.