File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
arduino-ide-extension/src/node Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ export class ConfigServiceImpl
5656 this . loadCliConfig ( ) . then ( async ( cliConfig ) => {
5757 this . cliConfig = cliConfig ;
5858 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+ ] ) ;
6063 if ( config ) {
6164 this . config = config ;
6265 this . ready . resolve ( ) ;
@@ -263,4 +266,11 @@ export class ConfigServiceImpl
263266 grpc . credentials . createInsecure ( )
264267 ) as SettingsServiceClient ;
265268 }
269+
270+ // #1445
271+ private async ensureUserDirExists (
272+ cliConfig : DefaultCliConfig
273+ ) : Promise < void > {
274+ await fs . mkdir ( cliConfig . directories . user , { recursive : true } ) ;
275+ }
266276}
You can’t perform that action at this time.
0 commit comments