(cwd, logger=None)
return ret != 0
Ensure that node_modules is up to date.

    Returns true if the node_modules was updated.
Ensure that node_modules is up to date.
Ensure that node_modules is up to date .
def ensure_node_modules(cwd, logger=None):
    """Ensure that node_modules is up to date.

    Returns true if the node_modules was updated.
    """
    logger = _ensure_logger(logger)
    yarn_proc = ProgressProcess(['node', YARN_PATH, 'check', '--verify-tree'], cwd=cwd, logger=logger)
    ret = yarn_proc.wait()

    # Update node_modules if needed.
    if ret != 0:
        yarn_proc = ProgressProcess(['node', YARN_PATH], cwd=cwd, logger=logger)
        yarn_proc.wait()
        dedupe_yarn(REPO_ROOT, logger)

    return ret != 0
def ensure_node_modules ( cwd , logger = None ) : logger = _ensure_logger ( logger ) yarn_proc = ProgressProcess ( [ 'node' , YARN_PATH , 'check' , '--verify-tree' ] , cwd = cwd , logger = logger ) ret = yarn_proc . wait ( ) # Update node_modules if needed. if ret != 0 : yarn_proc = ProgressProcess ( [ 'node' , YARN_PATH ] , cwd = cwd , logger = logger ) yarn_proc . wait ( ) dedupe_yarn ( REPO_ROOT , logger ) return ret != 0