mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -112,8 +112,12 @@ export function isPathInSandboxWriteAllowlist(resolvedPath: string): boolean {
|
||||
// their resolution to avoid N × config.length redundant syscalls per
|
||||
// command with N write targets (matching getResolvedWorkingDirPaths).
|
||||
const pathsToCheck = getPathsForPermissionCheck(resolvedPath)
|
||||
const resolvedAllow = allowOnly.flatMap(getResolvedSandboxConfigPath) as string[]
|
||||
const resolvedDeny = denyWithinAllow.flatMap(getResolvedSandboxConfigPath) as string[]
|
||||
const resolvedAllow = allowOnly.flatMap(
|
||||
getResolvedSandboxConfigPath,
|
||||
) as string[]
|
||||
const resolvedDeny = denyWithinAllow.flatMap(
|
||||
getResolvedSandboxConfigPath,
|
||||
) as string[]
|
||||
return pathsToCheck.every(p => {
|
||||
for (const denyPath of resolvedDeny) {
|
||||
if (pathInWorkingPath(p, denyPath)) return false
|
||||
@@ -184,7 +188,11 @@ export function isPathAllowed(
|
||||
precomputedPathsToCheck,
|
||||
)
|
||||
if (!safetyCheck.safe) {
|
||||
const failedCheck = safetyCheck as { safe: false; message: string; classifierApprovable: boolean }
|
||||
const failedCheck = safetyCheck as {
|
||||
safe: false
|
||||
message: string
|
||||
classifierApprovable: boolean
|
||||
}
|
||||
return {
|
||||
allowed: false,
|
||||
decisionReason: {
|
||||
|
||||
Reference in New Issue
Block a user