From fd65d78475a2c291ee75e5c47c0dc9d8d6a8cc09 Mon Sep 17 00:00:00 2001 From: Brendan Kellam Date: Mon, 12 May 2025 14:42:53 -0700 Subject: [PATCH] chore: Resolve `DATA_CACHE_DIR` in `.env.development` (#306) --- .env.development | 3 ++- package.json | 1 - packages/backend/package.json | 2 +- packages/backend/src/index.ts | 3 --- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.env.development b/.env.development index 463cc1fa..f4ca1600 100644 --- a/.env.development +++ b/.env.development @@ -23,7 +23,8 @@ AUTH_URL="http://localhost:3000" # AUTH_GOOGLE_CLIENT_ID="" # AUTH_GOOGLE_CLIENT_SECRET="" -#DATA_CACHE_DIR="" # Path to the sourcebot cache dir (ex. ~/sourcebot/.sourcebot) +DATA_CACHE_DIR=${PWD}/.sourcebot # Path to the sourcebot cache dir (ex. ~/sourcebot/.sourcebot) +# CONFIG_PATH=${PWD}/config.json # Path to the sourcebot config file (if one exists) # Email # EMAIL_FROM_ADDRESS="" # The from address for transactional emails. diff --git a/package.json b/package.json index 53e3e363..88261765 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "dev:zoekt": "yarn with-env zoekt-webserver -index .sourcebot/index -rpc", "dev:backend": "yarn with-env yarn workspace @sourcebot/backend dev:watch", "dev:web": "yarn with-env yarn workspace @sourcebot/web dev", - "dev:review-agent": "yarn with-env yarn workspace @sourcebot/review-agent dev", "watch:mcp": "yarn workspace @sourcebot/mcp build:watch", "watch:schemas": "yarn workspace @sourcebot/schemas watch", "dev:prisma:migrate:dev": "yarn with-env yarn workspace @sourcebot/db prisma:migrate:dev", diff --git a/packages/backend/package.json b/packages/backend/package.json index e3fef75a..be2d3ec2 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -5,7 +5,7 @@ "main": "index.js", "type": "module", "scripts": { - "dev:watch": "tsc-watch --preserveWatchOutput --onSuccess \"yarn dev --cacheDir ../../.sourcebot\"", + "dev:watch": "tsc-watch --preserveWatchOutput --onSuccess \"yarn dev\"", "dev": "node ./dist/index.js", "build": "tsc", "test": "cross-env SKIP_ENV_VALIDATION=1 vitest --config ./vitest.config.ts" diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 346f2ff9..149d3bd4 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -1,7 +1,6 @@ import "./instrument.js"; import * as Sentry from "@sentry/node"; -import { ArgumentParser } from "argparse"; import { existsSync } from 'fs'; import { mkdir } from 'fs/promises'; import path from 'path'; @@ -37,8 +36,6 @@ process.on('unhandledRejection', (reason, promise) => { process.exit(1); }); -console.log(process.cwd()); - const cacheDir = env.DATA_CACHE_DIR; const reposPath = path.join(cacheDir, 'repos'); const indexPath = path.join(cacheDir, 'index');