mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-10 14:16:34 +00:00
Ensure directories.user
exists.
Closes #1445 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
parent
b3ab5cbd2a
commit
6983c5bf7f
@ -56,7 +56,10 @@ export class ConfigServiceImpl
|
||||
this.loadCliConfig().then(async (cliConfig) => {
|
||||
this.cliConfig = cliConfig;
|
||||
if (this.cliConfig) {
|
||||
const config = await this.mapCliConfigToAppConfig(this.cliConfig);
|
||||
const [config] = await Promise.all([
|
||||
this.mapCliConfigToAppConfig(this.cliConfig),
|
||||
this.ensureUserDirExists(this.cliConfig),
|
||||
]);
|
||||
if (config) {
|
||||
this.config = config;
|
||||
this.ready.resolve();
|
||||
@ -263,4 +266,11 @@ export class ConfigServiceImpl
|
||||
grpc.credentials.createInsecure()
|
||||
) as SettingsServiceClient;
|
||||
}
|
||||
|
||||
// #1445
|
||||
private async ensureUserDirExists(
|
||||
cliConfig: DefaultCliConfig
|
||||
): Promise<void> {
|
||||
await fs.mkdir(cliConfig.directories.user, { recursive: true });
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user