@feigi/fleet-ctl 3.158.20 → 3.158.21
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.
- package/package.json +1 -1
- package/scripts/phase0.mjs +15 -8
package/package.json
CHANGED
package/scripts/phase0.mjs
CHANGED
|
@@ -599,18 +599,25 @@ function shortlist({ cwd }) {
|
|
|
599
599
|
return ok("shortlist built");
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
-
// The
|
|
603
|
-
//
|
|
604
|
-
//
|
|
605
|
-
//
|
|
606
|
-
//
|
|
607
|
-
//
|
|
602
|
+
// The alarm step accepts a `fleet` spelling only when the OS resolves it to
|
|
603
|
+
// this checkout's `.fleet/`. So the OS stats the part that must exist (the
|
|
604
|
+
// path itself when its last name is `.` or `..`, else the checkout holding it,
|
|
605
|
+
// the directory part), and then resolves that checkout through symlinks. A
|
|
606
|
+
// `..` after a directory that does not exist, after a file, or out of a
|
|
607
|
+
// directory the OS may not search is refused by that stat, though darwin's
|
|
608
|
+
// realpath folds `file/..` and `unsearchable/..` and `join` folds a trailing
|
|
609
|
+
// `..` as text; a `..` after a directory or a symlink to one resolves where
|
|
610
|
+
// the OS takes it; and on a case-insensitive volume a letter-case variant of
|
|
611
|
+
// the checkout path is the same checkout. The `.fleet` name is compared as
|
|
612
|
+
// given, so it works before `.fleet/` exists and `.FLEET` is another name. A
|
|
613
|
+
// path that is not absolute, or that the OS does not resolve, stays as given.
|
|
608
614
|
function fleetIdentity(path) {
|
|
609
615
|
if (typeof path !== "string" || !isAbsolute(path)) return path;
|
|
610
616
|
try {
|
|
611
617
|
const checkout = dirname(path);
|
|
612
|
-
|
|
613
|
-
|
|
618
|
+
const name = basename(path);
|
|
619
|
+
statSync(name === "." || name === ".." ? path : checkout);
|
|
620
|
+
return join(realpathSync.native(checkout), name);
|
|
614
621
|
} catch {
|
|
615
622
|
return path;
|
|
616
623
|
}
|