fix: It is now validated if the instance name contains uppercase and special characters

This commit is contained in:
Davidson Gomes 2023-07-21 12:40:58 -03:00
parent d7f264c1c2
commit 091b920a22

View File

@ -55,7 +55,6 @@ export class RepositoryBroker {
const chatwootDir = join(storePath, 'chatwoot');
const tempDir = join(storePath, 'temp');
// Check if directories exist, create them if not
if (!fs.existsSync(authDir)) {
this.logger.verbose('creating auth dir: ' + authDir);
fs.mkdirSync(authDir, { recursive: true });
@ -91,6 +90,21 @@ export class RepositoryBroker {
} catch (error) {
this.logger.error(error);
}
} else {
const storePath = join(process.cwd(), 'store');
this.logger.verbose('creating store path: ' + storePath);
const tempDir = join(storePath, 'temp');
if (!fs.existsSync(tempDir)) {
this.logger.verbose('creating temp dir: ' + tempDir);
fs.mkdirSync(tempDir, { recursive: true });
}
try {
} catch (error) {
this.logger.error(error);
}
}
}
}