From fe169832038b14411008cbbe017548abbc8d9dbd Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 21 Aug 2025 15:43:35 -0700 Subject: [PATCH] fix: install core dependencies for cli --- .github/workflows/cli-pr-checks.yml | 10 ++++++++++ core/indexing/ignore.ts | 2 +- core/tools/implementations/readCurrentlyOpenFile.ts | 2 +- core/tools/implementations/readFile.ts | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli-pr-checks.yml b/.github/workflows/cli-pr-checks.yml index 0284cae4b..bf6a86994 100644 --- a/.github/workflows/cli-pr-checks.yml +++ b/.github/workflows/cli-pr-checks.yml @@ -25,6 +25,11 @@ jobs: cache: "npm" cache-dependency-path: extensions/cli/package-lock.json + - name: Install core dependencies + run: | + cd core + npm i + - name: Install dependencies run: | cd extensions/cli @@ -53,6 +58,11 @@ jobs: cache: "npm" cache-dependency-path: extensions/cli/package-lock.json + - name: Install core dependencies + run: | + cd core + npm i + - name: Install dependencies run: | cd extensions/cli diff --git a/core/indexing/ignore.ts b/core/indexing/ignore.ts index e52eb4e60..5070d8930 100644 --- a/core/indexing/ignore.ts +++ b/core/indexing/ignore.ts @@ -251,7 +251,7 @@ export function isSecurityConcern(filePathOrUri: string) { return defaultFileAndFolderSecurityIgnores.ignores(filepath); } -export async function throwIfFileIsSecurityConcern(filepath: string) { +export function throwIfFileIsSecurityConcern(filepath: string) { if (isSecurityConcern(filepath)) { throw new Error( `Reading or Editing ${filepath} is not allowed because it is a security concern. Do not attempt to read or edit this file in any way.`, diff --git a/core/tools/implementations/readCurrentlyOpenFile.ts b/core/tools/implementations/readCurrentlyOpenFile.ts index dab943122..02b7be114 100644 --- a/core/tools/implementations/readCurrentlyOpenFile.ts +++ b/core/tools/implementations/readCurrentlyOpenFile.ts @@ -8,7 +8,7 @@ export const readCurrentlyOpenFileImpl: ToolImpl = async (_, extras) => { const result = await extras.ide.getCurrentFile(); if (result) { - await throwIfFileIsSecurityConcern(result.path); + throwIfFileIsSecurityConcern(result.path); await throwIfFileExceedsHalfOfContext( result.path, result.contents, diff --git a/core/tools/implementations/readFile.ts b/core/tools/implementations/readFile.ts index 9d8320dd2..afa6495ad 100644 --- a/core/tools/implementations/readFile.ts +++ b/core/tools/implementations/readFile.ts @@ -8,7 +8,7 @@ import { throwIfFileExceedsHalfOfContext } from "./readFileLimit"; export const readFileImpl: ToolImpl = async (args, extras) => { const filepath = getStringArg(args, "filepath"); - await throwIfFileIsSecurityConcern(filepath); + throwIfFileIsSecurityConcern(filepath); const firstUriMatch = await resolveRelativePathInDir(filepath, extras.ide); if (!firstUriMatch) {