mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 05:02:40 +00:00
fix(cli): validate selected local paths before resolution
Reuse the nonempty NUL-free local path contract before normalization in artifact commands, auxiliary inputs, and output destinations. Empty selections now fail at parsing instead of selecting the working directory; explicit relative paths preserve their target. Public CLI checks cover primary and auxiliary empty paths, exact relative-file digest, explicit current-directory selection, symlink parent semantics, and environment export inputs. Correct the desktop fixture to assert the existing CLI validation envelope.
This commit is contained in:
1 parent
231e458246
commit
9d7779d365
20 files changed
+229
-58
No files matched your search
@@ -22,6 +22,7 @@ import { runCliJavaScriptApplicationAnalysis } from "./javascriptApplicationAnal
|
||||
import { withCommandCancellation } from "./commandCancellation.js";
|
||||
import { javascriptApplicationOptions } from "../cliObservationOptions.js";
|
||||
import { AnalysisInputError } from "../domain/analysisErrorCore.js";
|
||||
import { localPathStringSchema } from "../domain/localPath.js";
|
||||
import { absoluteCallerPath } from "../filesystem/callerPath.js";
|
||||
import { registerDecompileDirectoryCommand } from "./decompileDirectoryCommand.js";
|
||||
|
||||
@@ -84,10 +85,9 @@ const registerOverviewCommands = (
|
||||
cli.command(CLI_COMMANDS.analyze, {
|
||||
description: "Get an overview of an app",
|
||||
args: z.object({
|
||||
path: z
|
||||
.string()
|
||||
.min(1)
|
||||
.describe("App, program, or analysis database path"),
|
||||
path: localPathStringSchema.describe(
|
||||
"App, program, or analysis database path",
|
||||
),
|
||||
}),
|
||||
options: overviewOptions.extend({
|
||||
integrityPolicy: laneIntegrityPolicy,
|
||||
|
||||
Reference in new issue
Block a user