1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-21 20:33:00 +00:00

Handle num_projects='?'

This commit is contained in:
Jörn-Michael Miehe 2020-08-17 13:14:54 +02:00
parent 1cf3b5ca55
commit f222786015

View file

@ -8,10 +8,13 @@ from .executable import Executable
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
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_dir = f'{project_name}{project_marker}'
kwargs['cwd'] = project_dir