Ensure recursive creation of ssh-keys directory
Updated the initialization logic to use the 'recursive' option when creating the data/ssh-keys directory, ensuring parent directories are created if they do not exist.
This commit is contained in:
@@ -9,10 +9,10 @@ class DatabaseServicePrisma {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
// Ensure data/ssh-keys directory exists
|
// Ensure data/ssh-keys directory exists (recursive to create parent dirs)
|
||||||
const sshKeysDir = join(process.cwd(), 'data', 'ssh-keys');
|
const sshKeysDir = join(process.cwd(), 'data', 'ssh-keys');
|
||||||
if (!existsSync(sshKeysDir)) {
|
if (!existsSync(sshKeysDir)) {
|
||||||
mkdirSync(sshKeysDir, { mode: 0o700 });
|
mkdirSync(sshKeysDir, { recursive: true, mode: 0o700 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ class DatabaseServicePrisma {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
// Ensure data/ssh-keys directory exists
|
// Ensure data/ssh-keys directory exists (recursive to create parent dirs)
|
||||||
const sshKeysDir = join(process.cwd(), 'data', 'ssh-keys');
|
const sshKeysDir = join(process.cwd(), 'data', 'ssh-keys');
|
||||||
if (!existsSync(sshKeysDir)) {
|
if (!existsSync(sshKeysDir)) {
|
||||||
mkdirSync(sshKeysDir, { mode: 0o700 });
|
mkdirSync(sshKeysDir, { recursive: true, mode: 0o700 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user