We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ec91bf commit e3e61f6Copy full SHA for e3e61f6
src/server.js
@@ -22,7 +22,10 @@ class CoCreateLazyLoader {
22
async init() {
23
const scriptsDirectory = './scripts';
24
25
- if (!await fs.access(scriptsDirectory)) {
+ try {
26
+ await fs.access(directory);
27
+ console.log("The directory exists.");
28
+ } catch (error) {
29
try {
30
await fs.mkdir(scriptsDirectory, { recursive: true });
31
console.log(`Scripts directory created at ${scriptsDirectory}`);
0 commit comments