mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
feat(coding-agent): add PI_SKIP_VERSION_CHECK env variable
Skip new version check at startup when set. Useful for Nix or other package manager installs where npm install is not used. Also documents PI_CODING_AGENT_DIR and other environment variables in the README. closes #549 Co-authored-by: Aos Dabbagh <25783780+aos@users.noreply.github.com>
This commit is contained in:
co-authored by
Aos Dabbagh
parent
e483521075
commit
6f726a2178
@@ -489,6 +489,8 @@ export class InteractiveMode {
|
||||
* Check npm registry for a newer version.
|
||||
*/
|
||||
private async checkForNewVersion(): Promise<string | undefined> {
|
||||
if (process.env.PI_SKIP_VERSION_CHECK) return undefined;
|
||||
|
||||
try {
|
||||
const response = await fetch("https://registry.npmjs.org/@mariozechner/pi-coding-agent/latest");
|
||||
if (!response.ok) return undefined;
|
||||
|
||||
Reference in New Issue
Block a user