@@ -419,6 +419,19 @@ def run(params={}, no_logging=False):
419419 if 'command' not in params :
420420 params ['command' ] = 'python' + python_ver + ' ' + src_file
421421
422+ if not os .path .exists (src_path ):
423+ message = format ('error: file not found: %s' % src_path )
424+ print (message )
425+ if 'no_logging' in params :
426+ return { 'error' : True , 'message' : message }
427+ sys .exit (1 )
428+ elif os .path .isdir (src_path ):
429+ message = format ('error: specified file is a directory: %s' % src_path )
430+ print (message )
431+ if 'no_logging' in params :
432+ return { 'error' : True , 'message' : message }
433+ sys .exit (1 )
434+
422435 params ['extraFiles' ] = []
423436 if 'workspace' not in params :
424437 params ['workspace' ] = src_path
@@ -439,19 +452,15 @@ def run(params={}, no_logging=False):
439452
440453 pipenv = params .pop ('pipenv' , None )
441454 if pipenv :
442- if isinstance (pipenv , str ):
443- pipenv = pipenv .split (',' )
444- elif isinstance (pipenv , bool ):
445- pipenv = ['Pipfile' , 'Pipfile.lock' ]
446- for pipfile in pipenv :
455+ for pipfile in ['Pipfile' , 'Pipfile.lock' ]:
447456 if os .path .exists (pipfile ):
448457 params ['extraFiles' ].append (pipfile )
449458 uses_python_ver = ''
450459 if python_ver .startswith ('3' ):
451460 uses_python_ver == '--three '
452461 elif python_ver .startswith ('2' ):
453462 uses_python_ver == '--two '
454- params ['command' ] = 'pipenv ' + uses_python_ver + 'install\n pipenv graph \ n ' + params ['command' ]
463+ params ['command' ] = 'pipenv ' + uses_python_ver + 'install\n ' + params ['command' ]
455464
456465 conda = params .pop ('conda' , None )
457466 if conda :
0 commit comments