chore: Resolve DATA_CACHE_DIR in .env.development (#306)

This commit is contained in:
Brendan Kellam 2025-05-12 14:42:53 -07:00 committed by GitHub
parent 59cd86d23e
commit fd65d78475
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 3 additions and 6 deletions

View file

@ -23,7 +23,8 @@ AUTH_URL="http://localhost:3000"
# AUTH_GOOGLE_CLIENT_ID="" # AUTH_GOOGLE_CLIENT_ID=""
# AUTH_GOOGLE_CLIENT_SECRET="" # 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
# EMAIL_FROM_ADDRESS="" # The from address for transactional emails. # EMAIL_FROM_ADDRESS="" # The from address for transactional emails.

View file

@ -12,7 +12,6 @@
"dev:zoekt": "yarn with-env zoekt-webserver -index .sourcebot/index -rpc", "dev:zoekt": "yarn with-env zoekt-webserver -index .sourcebot/index -rpc",
"dev:backend": "yarn with-env yarn workspace @sourcebot/backend dev:watch", "dev:backend": "yarn with-env yarn workspace @sourcebot/backend dev:watch",
"dev:web": "yarn with-env yarn workspace @sourcebot/web dev", "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:mcp": "yarn workspace @sourcebot/mcp build:watch",
"watch:schemas": "yarn workspace @sourcebot/schemas watch", "watch:schemas": "yarn workspace @sourcebot/schemas watch",
"dev:prisma:migrate:dev": "yarn with-env yarn workspace @sourcebot/db prisma:migrate:dev", "dev:prisma:migrate:dev": "yarn with-env yarn workspace @sourcebot/db prisma:migrate:dev",

View file

@ -5,7 +5,7 @@
"main": "index.js", "main": "index.js",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev:watch": "tsc-watch --preserveWatchOutput --onSuccess \"yarn dev --cacheDir ../../.sourcebot\"", "dev:watch": "tsc-watch --preserveWatchOutput --onSuccess \"yarn dev\"",
"dev": "node ./dist/index.js", "dev": "node ./dist/index.js",
"build": "tsc", "build": "tsc",
"test": "cross-env SKIP_ENV_VALIDATION=1 vitest --config ./vitest.config.ts" "test": "cross-env SKIP_ENV_VALIDATION=1 vitest --config ./vitest.config.ts"

View file

@ -1,7 +1,6 @@
import "./instrument.js"; import "./instrument.js";
import * as Sentry from "@sentry/node"; import * as Sentry from "@sentry/node";
import { ArgumentParser } from "argparse";
import { existsSync } from 'fs'; import { existsSync } from 'fs';
import { mkdir } from 'fs/promises'; import { mkdir } from 'fs/promises';
import path from 'path'; import path from 'path';
@ -37,8 +36,6 @@ process.on('unhandledRejection', (reason, promise) => {
process.exit(1); process.exit(1);
}); });
console.log(process.cwd());
const cacheDir = env.DATA_CACHE_DIR; const cacheDir = env.DATA_CACHE_DIR;
const reposPath = path.join(cacheDir, 'repos'); const reposPath = path.join(cacheDir, 'repos');
const indexPath = path.join(cacheDir, 'index'); const indexPath = path.join(cacheDir, 'index');