Skip to content

Commit

Permalink
Merge pull request #11 from EmergeTools/feature/config_path_warning
Browse files Browse the repository at this point in the history
Add warning message if config doesn't exist at path
  • Loading branch information
Itaybre authored Oct 2, 2023
2 parents 2d26a01 + c39a92b commit 652f318
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/fastlane/plugin/emerge/actions/emerge_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,16 @@ def self.copy_dsyms(from, to)
end

def self.copy_config(config_path, tmp_dir)
if config_path != nil && File.exist?(config_path)
emerge_config_path = "#{tmp_dir}/emerge_config.yaml"
FileUtils.cp(config_path, emerge_config_path)
return unless config_path != nil

expanded_path = File.expand_path(config_path)
if not File.exist?(expanded_path)
UI.error("No config file found at path '#{expanded_path}'.\nUploading without config file")
return
end

emerge_config_path = "#{tmp_dir}/emerge_config.yaml"
FileUtils.cp(expanded_path, emerge_config_path)
end

def self.description
Expand Down

0 comments on commit 652f318

Please sign in to comment.