File tree 1 file changed +11
-1
lines changed
arduino-ide-extension/src/node
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ export class ConfigServiceImpl
56
56
this . loadCliConfig ( ) . then ( async ( cliConfig ) => {
57
57
this . cliConfig = cliConfig ;
58
58
if ( this . cliConfig ) {
59
- const config = await this . mapCliConfigToAppConfig ( this . cliConfig ) ;
59
+ const [ config ] = await Promise . all ( [
60
+ this . mapCliConfigToAppConfig ( this . cliConfig ) ,
61
+ this . ensureUserDirExists ( this . cliConfig ) ,
62
+ ] ) ;
60
63
if ( config ) {
61
64
this . config = config ;
62
65
this . ready . resolve ( ) ;
@@ -263,4 +266,11 @@ export class ConfigServiceImpl
263
266
grpc . credentials . createInsecure ( )
264
267
) as SettingsServiceClient ;
265
268
}
269
+
270
+ // #1445
271
+ private async ensureUserDirExists (
272
+ cliConfig : DefaultCliConfig
273
+ ) : Promise < void > {
274
+ await fs . mkdir ( cliConfig . directories . user , { recursive : true } ) ;
275
+ }
266
276
}
You can’t perform that action at this time.
0 commit comments