diff --git a/packages/@o3r/test-helpers/src/utilities/locker.ts b/packages/@o3r/test-helpers/src/utilities/locker.ts index 262662dc92..130caaf284 100644 --- a/packages/@o3r/test-helpers/src/utilities/locker.ts +++ b/packages/@o3r/test-helpers/src/utilities/locker.ts @@ -100,8 +100,12 @@ export class Locker { resolve(); } }; - watcher = watch(this.options.lockFilePath, {persistent: false}, check); - watcher.on('error', check); + try { + watcher = watch(this.options.lockFilePath, {persistent: false}, check); + watcher.on('error', check); + } catch { + check(); + } }); } }