mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-11-22 04:43:00 +00:00
Handle num_projects='?'
This commit is contained in:
parent
1cf3b5ca55
commit
f222786015
1 changed files with 5 additions and 2 deletions
|
@ -8,10 +8,13 @@ from .executable import Executable
|
||||||
|
|
||||||
|
|
||||||
def _update_kwargs(config, args, **kwargs):
|
def _update_kwargs(config, args, **kwargs):
|
||||||
if 'projects' in args:
|
if args is not None and 'projects' in args and args.projects is not None:
|
||||||
# command affects a project in this instance
|
# command affects a project in this instance
|
||||||
|
|
||||||
project_name = args.projects[0]
|
project_name = args.projects
|
||||||
|
if isinstance(project_name, list) and len(project_name) > 0:
|
||||||
|
project_name = project_name[0]
|
||||||
|
|
||||||
project_marker = config['markers:project']
|
project_marker = config['markers:project']
|
||||||
project_dir = f'{project_name}{project_marker}'
|
project_dir = f'{project_name}{project_marker}'
|
||||||
kwargs['cwd'] = project_dir
|
kwargs['cwd'] = project_dir
|
||||||
|
|
Loading…
Reference in a new issue