mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix: use correct directory for update checks (#1394)
This commit is contained in:
committed by
GitHub
parent
e356949d3f
commit
e3def2dd49
@@ -6,12 +6,11 @@
|
|||||||
|
|
||||||
import updateNotifier from 'update-notifier';
|
import updateNotifier from 'update-notifier';
|
||||||
import { readPackageUp } from 'read-package-up';
|
import { readPackageUp } from 'read-package-up';
|
||||||
import process from 'node:process';
|
|
||||||
|
|
||||||
export async function checkForUpdates(): Promise<string | null> {
|
export async function checkForUpdates(): Promise<string | null> {
|
||||||
try {
|
try {
|
||||||
// read-package-up looks for the closest package.json from cwd
|
// 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) {
|
if (!pkgResult) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user