mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 13:12:26 +00:00
refactor(application): read the host from HostPlatform in the remaining application modules (#11124)
Scenario planning and plan Evidence take a required platform. Host file operations (target resolution, output trees, Windows spelling lookup, executable checks, native snapshot admission), the Linux distribution read and the process CLI adapter read HOST_PLATFORM explicitly. ByteEntropyService takes an optional platform seam, so its Windows casing test injects win32 instead of stubbing process.platform. src/application no longer reads process.platform or process.arch.
This commit is contained in:
1 parent
341924d043
commit
271e375924
15 files changed
+55
-46
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { HOST_PLATFORM } from "../../platform/HostPlatform.js";
|
||||
import { dirname } from "node:path";
|
||||
import { constants, type Stats } from "node:fs";
|
||||
import { access, realpath, stat } from "node:fs/promises";
|
||||
@@ -118,7 +119,7 @@ const resolveExecutablePath = async (
|
||||
}
|
||||
if (!metadata.isFile())
|
||||
return err(notExecutable(selected, new Error("not a regular file")));
|
||||
if (process.platform !== "win32")
|
||||
if (HOST_PLATFORM.platform !== "win32")
|
||||
try {
|
||||
await access(resolved.value, constants.X_OK);
|
||||
} catch (cause: unknown) {
|
||||
|
||||
Reference in new issue
Block a user