diff --git a/lib/sigh/download_all.rb b/lib/sigh/download_all.rb index 553b822..ec11884 100644 --- a/lib/sigh/download_all.rb +++ b/lib/sigh/download_all.rb @@ -18,11 +18,10 @@ def download_all end def download_profile(profile) - output = Sigh.config[:output_path] || "/tmp" - + FileUtils.mkdir_p(Sigh.config[:output_path]) profile_name = "#{profile.class.pretty_type}_#{profile.app.bundle_id}.mobileprovision" # default name - output_path = File.join(output, profile_name) + output_path = File.join(Sigh.config[:output_path], profile_name) File.open(output_path, "wb") do |f| f.write(profile.download) end diff --git a/lib/sigh/manager.rb b/lib/sigh/manager.rb index 42747bf..92dd93b 100644 --- a/lib/sigh/manager.rb +++ b/lib/sigh/manager.rb @@ -14,6 +14,7 @@ def self.start file_name = File.basename(path) end + FileUtils.mkdir_p(Sigh.config[:output_path]) output = File.join(File.expand_path(Sigh.config[:output_path]), file_name) begin FileUtils.mv(path, output) diff --git a/lib/sigh/options.rb b/lib/sigh/options.rb index 2157b52..d88b430 100644 --- a/lib/sigh/options.rb +++ b/lib/sigh/options.rb @@ -62,10 +62,7 @@ def self.available_options short_option: "-o", env_name: "SIGH_OUTPUT_PATH", description: "Directory in which the profile should be stored", - default_value: ".", - verify_block: proc do |value| - raise "Could not find output directory '#{value}'".red unless File.exist?(value) - end), + default_value: "."), FastlaneCore::ConfigItem.new(key: :cert_id, short_option: "-i", env_name: "SIGH_CERTIFICATE_ID",