@@ -3,12 +3,9 @@ import * as semver from "semver";
3
3
import * as constants from "./constants" ;
4
4
5
5
export class NpmInstallationManager implements INpmInstallationManager {
6
- private static NPM_LOAD_FAILED = "Failed to retrieve data from npm. Please try again a little bit later." ;
7
-
8
6
constructor ( private $npm : INodePackageManager ,
9
7
private $childProcess : IChildProcess ,
10
8
private $logger : ILogger ,
11
- private $errors : IErrors ,
12
9
private $options : IOptions ,
13
10
private $fs : IFileSystem ,
14
11
private $staticConfig : IStaticConfig ) {
@@ -35,7 +32,6 @@ export class NpmInstallationManager implements INpmInstallationManager {
35
32
}
36
33
37
34
public async install ( packageName : string , projectDir : string , opts ?: INpmInstallOptions ) : Promise < any > {
38
-
39
35
try {
40
36
let packageToInstall = this . $options . frameworkPath || packageName ;
41
37
let pathToSave = projectDir ;
@@ -45,7 +41,8 @@ export class NpmInstallationManager implements INpmInstallationManager {
45
41
return await this . installCore ( packageToInstall , pathToSave , version , dependencyType ) ;
46
42
} catch ( error ) {
47
43
this . $logger . debug ( error ) ;
48
- this . $errors . fail ( "%s. Error: %s" , NpmInstallationManager . NPM_LOAD_FAILED , error ) ;
44
+
45
+ throw new Error ( error ) ;
49
46
}
50
47
}
51
48
0 commit comments