File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/cli/src/command-helpers Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ import { createGunzip } from 'node:zlib';
88import decompress from 'decompress' ;
99import fetch from '../fetch.js' ;
1010
11+ // Add GitHub repository configuration via environment variables with defaults
12+ const GRAPH_NODE_GITHUB_OWNER = process . env . GRAPH_NODE_GITHUB_OWNER || 'graphprotocol' ;
13+ const GRAPH_NODE_GITHUB_REPO = process . env . GRAPH_NODE_GITHUB_REPO || 'graph-node' ;
14+
1115function getPlatformBinaryName ( ) : string {
1216 const platform = os . platform ( ) ;
1317 const arch = os . arch ( ) ;
@@ -43,7 +47,7 @@ async function getLatestGithubRelease(owner: string, repo: string) {
4347}
4448
4549export async function getLatestGraphNodeRelease ( ) : Promise < string > {
46- return getLatestGithubRelease ( 'graphprotocol' , 'graph-node' ) ;
50+ return getLatestGithubRelease ( GRAPH_NODE_GITHUB_OWNER , GRAPH_NODE_GITHUB_REPO ) ;
4751}
4852
4953export async function downloadGraphNodeRelease (
@@ -55,8 +59,8 @@ export async function downloadGraphNodeRelease(
5559
5660 try {
5761 return await downloadGithubRelease (
58- 'graphprotocol' ,
59- 'graph-node' ,
62+ GRAPH_NODE_GITHUB_OWNER ,
63+ GRAPH_NODE_GITHUB_REPO ,
6064 release ,
6165 outputDir ,
6266 fileName ,
You can’t perform that action at this time.
0 commit comments