diff options
author | Danilo Sousa <dsgoncalves@uoldiveo.com> | 2016-07-26 13:37:29 -0300 |
---|---|---|
committer | Danilo Sousa <dsgoncalves@uoldiveo.com> | 2016-07-26 13:37:29 -0300 |
commit | b8f56e81dcc7696bb983cfc89a4829d28d4d638b (patch) | |
tree | 5004f4b3aec877c12903999242c400b2e198df84 /lib | |
parent | c6246680d2cb524cba36d414411f6546224130e3 (diff) |
only resolve the repository path when the output is `git` fixes #512
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/node.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 3e46b17..f2b125a 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -22,7 +22,7 @@ module Oxidized @vars = opt[:vars] @stats = Stats.new @retry = 0 - @repo = resolve_repo + @repo = resolve_repo opt # model instance needs to access node instance @model.node = self @@ -171,7 +171,9 @@ module Oxidized Oxidized.mgr.model[model].new end - def resolve_repo + def resolve_repo opt + return unless is_git? opt + remote_repo = Oxidized.config.output.git.repo if remote_repo.is_a?(::String) @@ -185,5 +187,9 @@ module Oxidized end end + def is_git? opt + (opt[:output] || Oxidized.config.output.default) == 'git' + end + end end |