File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as path from "path";
22import * as semver from "semver" ;
33import * as npm from "npm" ;
44import * as constants from "./constants" ;
5+ import { sleep } from "../lib/common/helpers" ;
56
67export class NpmInstallationManager implements INpmInstallationManager {
78 private static NPM_LOAD_FAILED = "Failed to retrieve data from npm. Please try again a little bit later." ;
@@ -107,8 +108,8 @@ export class NpmInstallationManager implements INpmInstallationManager {
107108 public install ( packageName : string , opts ?: INpmInstallOptions ) : IFuture < string > {
108109 return ( ( ) => {
109110
110- while ( this . $lockfile . check ( ) . wait ( ) ) {
111- ;
111+ while ( this . $lockfile . check ( ) . wait ( ) ) {
112+ sleep ( 10 ) ;
112113 }
113114
114115 this . $lockfile . lock ( ) . wait ( ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import * as shelljs from "shelljs";
55import Future = require( "fibers/future" ) ;
66import * as destCopyLib from "./node-modules-dest-copy" ;
77import * as fiberBootstrap from "../../common/fiber-bootstrap" ;
8+ import { sleep } from "../../../lib/common/helpers" ;
89
910let glob = require ( "glob" ) ;
1011
@@ -35,8 +36,8 @@ export class Builder implements IBroccoliBuilder {
3536 } , ( er : Error , files : string [ ] ) => {
3637 fiberBootstrap . run ( ( ) => {
3738
38- while ( this . $lockfile . check ( ) . wait ( ) ) {
39- ;
39+ while ( this . $lockfile . check ( ) . wait ( ) ) {
40+ sleep ( 10 ) ;
4041 }
4142
4243 this . $lockfile . lock ( ) . wait ( ) ;
You can’t perform that action at this time.
0 commit comments