File tree 2 files changed +6
-4
lines changed
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";
2
2
import * as semver from "semver" ;
3
3
import * as npm from "npm" ;
4
4
import * as constants from "./constants" ;
5
+ import { sleep } from "../lib/common/helpers" ;
5
6
6
7
export class NpmInstallationManager implements INpmInstallationManager {
7
8
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 {
107
108
public install ( packageName : string , opts ?: INpmInstallOptions ) : IFuture < string > {
108
109
return ( ( ) => {
109
110
110
- while ( this . $lockfile . check ( ) . wait ( ) ) {
111
- ;
111
+ while ( this . $lockfile . check ( ) . wait ( ) ) {
112
+ sleep ( 10 ) ;
112
113
}
113
114
114
115
this . $lockfile . lock ( ) . wait ( ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import * as shelljs from "shelljs";
5
5
import Future = require( "fibers/future" ) ;
6
6
import * as destCopyLib from "./node-modules-dest-copy" ;
7
7
import * as fiberBootstrap from "../../common/fiber-bootstrap" ;
8
+ import { sleep } from "../../../lib/common/helpers" ;
8
9
9
10
let glob = require ( "glob" ) ;
10
11
@@ -35,8 +36,8 @@ export class Builder implements IBroccoliBuilder {
35
36
} , ( er : Error , files : string [ ] ) => {
36
37
fiberBootstrap . run ( ( ) => {
37
38
38
- while ( this . $lockfile . check ( ) . wait ( ) ) {
39
- ;
39
+ while ( this . $lockfile . check ( ) . wait ( ) ) {
40
+ sleep ( 10 ) ;
40
41
}
41
42
42
43
this . $lockfile . lock ( ) . wait ( ) ;
You can’t perform that action at this time.
0 commit comments