use cacheDirPath for temporary directories

This commit is contained in:
Joseph Garrone
2024-05-17 00:54:54 +02:00
parent f935922241
commit 7d61be231e
6 changed files with 21 additions and 21 deletions

View File

@ -30,7 +30,9 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
const { keycloakVersion } = await promptKeycloakVersion();
const builtinKeycloakThemeTmpDirPath = pathJoin(emailThemeSrcDirPath, "..", "tmp_xIdP3_builtin_keycloak_theme");
const builtinKeycloakThemeTmpDirPath = pathJoin(buildOptions.cacheDirPath, "initialize-email-theme_tmp");
rmSync(builtinKeycloakThemeTmpDirPath, { "recursive": true, "force": true });
await downloadBuiltinKeycloakTheme({
keycloakVersion,
@ -51,5 +53,5 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
logger.log(`${pathRelative(process.cwd(), emailThemeSrcDirPath)} ready to be customized, feel free to remove every file you do not customize`);
rmSync(builtinKeycloakThemeTmpDirPath, { "recursive": true, "force": true });
rmSync(builtinKeycloakThemeTmpDirPath, { "recursive": true });
}