mirror of
https://github.com/morluto/rea
synced 2026-10-27 06:33:32 -04: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:
@@ -5,6 +5,7 @@ import { logCliCommand } from "../cliLogging.js";
|
||||
import type { Logger } from "pino";
|
||||
import type { CliInstance } from "./types.js";
|
||||
import { withCommandCancellation } from "./commandCancellation.js";
|
||||
import { localPathStringSchema } from "../domain/localPath.js";
|
||||
import { absoluteCallerPath } from "../filesystem/callerPath.js";
|
||||
import { finishAnalysisCommand } from "./finishAnalysisCommand.js";
|
||||
import { inspectSqliteDatabaseInputSchema } from "../domain/sqlite/sqliteDatabase.js";
|
||||
@@ -20,7 +21,7 @@ export const registerSqliteCommands = (
|
||||
description:
|
||||
"Inspect SQLite schema and optional ordinary-table rows from a local snapshot",
|
||||
args: z.object({
|
||||
path: z.string().describe("Local SQLite database snapshot"),
|
||||
path: localPathStringSchema.describe("Local SQLite database snapshot"),
|
||||
}),
|
||||
options: z.object({
|
||||
workerTimeoutMs: inspectSqliteDatabaseInputSchema.shape.worker_timeout_ms,
|
||||
|
||||
Reference in New Issue
Block a user