diff --git a/lib/foreman/cli.rb b/lib/foreman/cli.rb index a32e156..fef13d5 100644 --- a/lib/foreman/cli.rb +++ b/lib/foreman/cli.rb @@ -7,6 +7,7 @@ require "yaml" class Foreman::CLI < Thor class_option :procfile, :type => :string, :aliases => "-f", :desc => "Default: Procfile" + class_option :app_root, :type => :string, :aliases => "-d", :desc => "Default: Procfile directory" desc "start [PROCESS]", "Start the application, or a specific process" diff --git a/lib/foreman/engine.rb b/lib/foreman/engine.rb index c74c9cb..c254c30 100644 --- a/lib/foreman/engine.rb +++ b/lib/foreman/engine.rb @@ -21,7 +21,7 @@ class Foreman::Engine def initialize(procfile, options={}) @procfile = Foreman::Procfile.new(procfile) - @directory = File.expand_path(File.dirname(procfile)) + @directory = options[:app_root] || File.expand_path(File.dirname(procfile)) @options = options @environment = read_environment_files(options[:env]) end