We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 429f518 commit 23192f1Copy full SHA for 23192f1
1 file changed
backend/src/services/locked-workspaces.ts
@@ -41,13 +41,12 @@ function loadConfig(): void {
41
// Load config on startup
42
loadConfig();
43
44
-// Watch for changes to the config file (reload when modified)
45
-if (existsSync(CONFIG_FILE)) {
46
- watchFile(CONFIG_FILE, { interval: 5000 }, () => {
47
- console.log('locked-workspaces.json changed, reloading...');
48
- loadConfig();
49
- });
50
-}
+// Watch for changes to the config file (reload when modified or created)
+// watchFile works even if the file doesn't exist yet - it will detect creation
+watchFile(CONFIG_FILE, { interval: 5000 }, () => {
+ console.log('locked-workspaces.json changed, reloading...');
+ loadConfig();
+});
51
52
export const lockedWorkspacesService = {
53
/**
0 commit comments