class Fastlane::FastFile
def import(path = nil)
def import(path = nil) raise "Please pass a path to the `import` action".red unless path path = path.dup.gsub("~", Dir.home) unless Pathname.new(path).absolute? # unless an absolute path path = File.join(File.expand_path('..', @path), path) end raise "Could not find Fastfile at path '#{path}'".red unless File.exist?(path) collector.did_launch_action(:import) parse(File.read(path)) # Check if we can also import local actions which are in the same directory as the Fastfile actions_path = File.join(File.expand_path("..", path), 'actions') Fastlane::Actions.load_external_actions(actions_path) if File.directory?(actions_path) end