fix: use correct directory for update checks (#1394)

This commit is contained in:
Marat Boshernitsan 2025-06-24 15:51:16 -07:00 committed by GitHub
parent e356949d3f
commit e3def2dd49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -6,12 +6,11 @@
import updateNotifier from 'update-notifier';
import { readPackageUp } from 'read-package-up';
import process from 'node:process';
export async function checkForUpdates(): Promise<string | null> {
try {
// read-package-up looks for the closest package.json from cwd
const pkgResult = await readPackageUp({ cwd: process.cwd() });
const pkgResult = await readPackageUp({ cwd: __dirname });
if (!pkgResult) {
return null;
}