Skip to content

Commit 23192f1

Browse files
workspace-lock command line fixes
1 parent 429f518 commit 23192f1

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

backend/src/services/locked-workspaces.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,12 @@ function loadConfig(): void {
4141
// Load config on startup
4242
loadConfig();
4343

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-
}
44+
// Watch for changes to the config file (reload when modified or created)
45+
// watchFile works even if the file doesn't exist yet - it will detect creation
46+
watchFile(CONFIG_FILE, { interval: 5000 }, () => {
47+
console.log('locked-workspaces.json changed, reloading...');
48+
loadConfig();
49+
});
5150

5251
export const lockedWorkspacesService = {
5352
/**

0 commit comments

Comments
 (0)