Skip to content

Commit

Permalink
Update command.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
jhongturney committed May 21, 2024
1 parent 0127026 commit bcf7028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/octocatalog-diff/catalog-util/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def setup
facts_terminus = @options.fetch(:facts_terminus, 'yaml')
if facts_terminus == 'yaml'
cmdline << "--factpath=#{Shellwords.escape(File.join(@compilation_dir, 'var', 'yaml', 'facts'))}"
if @options[:fact_file].is_a?(String) && @options[:fact_file] =~ /.*\.(\w+)$/
if @options[:fact_file].is_a?(String) && @options[:fact_file] =~ /.*{1,1000}\.(\w+)$/
fact_file = File.join(@compilation_dir, 'var', 'yaml', 'facts', "#{@node}.#{Regexp.last_match(1)}")
FileUtils.cp @options[:fact_file], fact_file unless File.file?(fact_file) || @options[:fact_file] == fact_file
end
Expand Down

0 comments on commit bcf7028

Please sign in to comment.