@Override public void executeNode() throws Exception { executeNpmInstall(false); }
@Override public void executeNode() throws Exception { executeNpmInstall(false); }
@TaskAction public void executeNode() throws Exception { int npmInstallRetries = getNpmInstallRetries(); NpmInstallTask npmInstallTask = GradleUtil.fetchTask( getProject(), NodePlugin.NPM_INSTALL_TASK_NAME, NpmInstallTask.class); if ((this instanceof ExecuteNpmTask) || (npmInstallRetries <= 0) || (npmInstallTask == null)) { _result = _nodeExecutor.execute(); return; } Logger logger = getLogger(); for (int i = 1; i <= npmInstallRetries; i++) { try { _result = _nodeExecutor.execute(); break; } catch (IOException ioe) { if (i == npmInstallRetries) { throw ioe; } if (logger.isWarnEnabled()) { logger.warn( ioe.getMessage() + ". Running \"npm install\" again"); } npmInstallTask.executeNpmInstall(true); } } }
@TaskAction public void executeNode() throws Exception { int npmInstallRetries = getNpmInstallRetries(); NpmInstallTask npmInstallTask = GradleUtil.fetchTask( getProject(), NodePlugin.NPM_INSTALL_TASK_NAME, NpmInstallTask.class); if ((this instanceof ExecuteNpmTask) || (npmInstallRetries <= 0) || (npmInstallTask == null)) { _result = _nodeExecutor.execute(); return; } Logger logger = getLogger(); for (int i = 1; i <= npmInstallRetries; i++) { try { _result = _nodeExecutor.execute(); break; } catch (IOException ioe) { if (i == npmInstallRetries) { throw ioe; } if (logger.isWarnEnabled()) { logger.warn( ioe.getMessage() + ". Running \"npm install\" again"); } npmInstallTask.executeNpmInstall(true); } } }