Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2f5fc6612 | ||
|
|
6847bc9473 |
@@ -35,6 +35,12 @@ export const acquireHopperTargetLease = async (input: {
|
|||||||
}): Promise<HopperTargetLeaseAcquisition> => {
|
}): Promise<HopperTargetLeaseAcquisition> => {
|
||||||
const directory = input.directory ?? leaseDirectory;
|
const directory = input.directory ?? leaseDirectory;
|
||||||
await ensureLeaseDirectory(directory);
|
await ensureLeaseDirectory(directory);
|
||||||
|
// The normal Hopper path supplies a readable canonical target from
|
||||||
|
// `parseBinaryTarget`. This extra `realpath` also canonicalizes direct
|
||||||
|
// callers and may fail if the filesystem changes before lease acquisition.
|
||||||
|
// Any failure falls back to a lexical absolute path because this value only
|
||||||
|
// keys coordination and never authorizes access. The fallback discards the
|
||||||
|
// filesystem error and can let aliases of the same target take separate leases.
|
||||||
const targetPath = await realpath(input.targetPath).catch(() =>
|
const targetPath = await realpath(input.targetPath).catch(() =>
|
||||||
resolve(input.targetPath),
|
resolve(input.targetPath),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user