fix: install core dependencies for cli
This commit is contained in:
parent
c920351c89
commit
fe16983203
4 changed files with 13 additions and 3 deletions
10
.github/workflows/cli-pr-checks.yml
vendored
10
.github/workflows/cli-pr-checks.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.`,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue