File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 7
7
"dependencies" : {
8
8
"@oclif/color" : " ^0.x" ,
9
9
"@oclif/command" : " ^1.5.12" ,
10
+ "@oclif/errors" : " ^1.2.2" ,
10
11
"chalk" : " ^2.4.2" ,
11
12
"cli-ux" : " ^5.2.1" ,
12
13
"debug" : " ^4.1.0" ,
21
22
"devDependencies" : {
22
23
"@oclif/config" : " ^1.12.11" ,
23
24
"@oclif/dev-cli" : " ^1.21.3" ,
24
- "@oclif/errors" : " ^1.2.2" ,
25
25
"@oclif/plugin-help" : " ^3.1.0" ,
26
26
"@oclif/test" : " ^1.2.4" ,
27
27
"@types/chai" : " ^4.1.7" ,
Original file line number Diff line number Diff line change @@ -84,6 +84,15 @@ export default class Plugins {
84
84
return plugin
85
85
} catch ( error ) {
86
86
await this . uninstall ( name ) . catch ( error => this . debug ( error ) )
87
+
88
+ if ( String ( error ) . includes ( 'EACCES' ) ) {
89
+ throw new CLIError ( error , {
90
+ suggestions : [
91
+ `Plugin failed to install because of a permissions error.\nDoes your current user own the directory ${ this . config . dataDir } ?` ,
92
+ ] ,
93
+ } )
94
+ }
95
+
87
96
throw error
88
97
}
89
98
}
You can’t perform that action at this time.
0 commit comments