Merge pull request #4589 from shin-/dbonev-2586-specify-cwd-parameter

Ability to change working directory via a CLI flag
This commit is contained in:
Joffrey F 2017-03-09 15:44:27 -08:00 committed by GitHub
commit beedceb66b
6 changed files with 38 additions and 9 deletions

View file

@ -33,7 +33,8 @@ def project_from_options(project_dir, options):
verbose=options.get('--verbose'),
host=host,
tls_config=tls_config_from_options(options),
environment=environment
environment=environment,
override_dir=options.get('--project-directory'),
)
@ -94,10 +95,10 @@ def get_client(environment, verbose=False, version=None, tls_config=None, host=N
def get_project(project_dir, config_path=None, project_name=None, verbose=False,
host=None, tls_config=None, environment=None):
host=None, tls_config=None, environment=None, override_dir=None):
if not environment:
environment = Environment.from_env_file(project_dir)
config_details = config.find(project_dir, config_path, environment)
config_details = config.find(project_dir, config_path, environment, override_dir)
project_name = get_project_name(
config_details.working_dir, project_name, environment
)