@atolis-hq/wake 0.3.43 → 0.3.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,6 +15,16 @@ export async function acquireFileLock(path, options) {
|
|
|
15
15
|
: acquireLegacyFileLock(path, metadata, options);
|
|
16
16
|
}
|
|
17
17
|
async function acquireStrictFileLock(path, metadata, options) {
|
|
18
|
+
try {
|
|
19
|
+
return await acquireStrictFileLockOnce(path, metadata, options);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
if (error.code !== 'ENOENT')
|
|
23
|
+
throw error;
|
|
24
|
+
return acquireStrictFileLockOnce(path, metadata, options);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async function acquireStrictFileLockOnce(path, metadata, options) {
|
|
18
28
|
const ownersPath = `${path}.owners`;
|
|
19
29
|
await mkdir(ownersPath, { recursive: true });
|
|
20
30
|
const legacy = await inspectLegacyOwner(path, ownersPath, options);
|