mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	mypy: Make success_stamp parameter to do_npm_install be required.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							bea44fb28a
						
					
				
				
					commit
					8433d95d99
				
			@@ -37,9 +37,9 @@ def setup_node_modules(npm_args=None, stdout=None, stderr=None, copy_modules=Fal
 | 
				
			|||||||
    if not os.path.exists(success_stamp):
 | 
					    if not os.path.exists(success_stamp):
 | 
				
			||||||
        do_npm_install(npm_cache,
 | 
					        do_npm_install(npm_cache,
 | 
				
			||||||
                       npm_args or [],
 | 
					                       npm_args or [],
 | 
				
			||||||
 | 
					                       success_stamp,
 | 
				
			||||||
                       stdout=stdout,
 | 
					                       stdout=stdout,
 | 
				
			||||||
                       stderr=stderr,
 | 
					                       stderr=stderr,
 | 
				
			||||||
                       success_stamp=success_stamp,
 | 
					 | 
				
			||||||
                       copy_modules=copy_modules)
 | 
					                       copy_modules=copy_modules)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print("Using cached node modules from %s" % (cached_node_modules,))
 | 
					    print("Using cached node modules from %s" % (cached_node_modules,))
 | 
				
			||||||
@@ -50,9 +50,9 @@ def setup_node_modules(npm_args=None, stdout=None, stderr=None, copy_modules=Fal
 | 
				
			|||||||
    for cmd in cmds:
 | 
					    for cmd in cmds:
 | 
				
			||||||
        run(cmd, stdout=stdout, stderr=stderr)
 | 
					        run(cmd, stdout=stdout, stderr=stderr)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def do_npm_install(target_path, npm_args, stdout=None, stderr=None, copy_modules=False,
 | 
					def do_npm_install(target_path, npm_args, success_stamp, stdout=None, stderr=None,
 | 
				
			||||||
                   success_stamp=None):
 | 
					                   copy_modules=False):
 | 
				
			||||||
    # type: (str, List[str], Optional[IO], Optional[IO], Optional[bool], Optional[str]) -> None
 | 
					    # type: (str, List[str], str, Optional[IO], Optional[IO], Optional[bool]) -> None
 | 
				
			||||||
    cmds = [
 | 
					    cmds = [
 | 
				
			||||||
        ["rm", "-rf", target_path],
 | 
					        ["rm", "-rf", target_path],
 | 
				
			||||||
        ['mkdir', '-p', target_path],
 | 
					        ['mkdir', '-p', target_path],
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user