diff --git a/lib/foreman/cli.rb b/lib/foreman/cli.rb index cb259c0..55f2d00 100644 --- a/lib/foreman/cli.rb +++ b/lib/foreman/cli.rb @@ -7,8 +7,7 @@ require "yaml" class Foreman::CLI < Thor class_option :procfile, :type => :string, :aliases => "-f", :desc => "Default: Procfile" - - desc "start", "Start the application" + class_option :app_root, :type => :string, :aliases => "-d", :desc => "Default: Procfile directory" method_option :env, :type => :string, :aliases => "-e", :desc => "Specify an environment file to load, defaults to .env" method_option :port, :type => :numeric, :aliases => "-p" diff --git a/lib/foreman/engine.rb b/lib/foreman/engine.rb index c9191b4..94ac725 100644 --- a/lib/foreman/engine.rb +++ b/lib/foreman/engine.rb @@ -23,7 +23,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]) @output_mutex = Mutex.new