File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,20 @@ const request = require("request");
4
4
const fileName = require ( "./file-name" ) ;
5
5
6
6
if ( fs . existsSync ( fileName . qualifiedName ) ) { return ; }
7
- if ( process . env [ "NATIVE_IMAGE_DIFF_SKIP_BINARY_DOWNLOAD_FOR_CI" ] ) { return ; }
7
+ if (
8
+ process . env [ "NATIVE_IMAGE_DIFF_SKIP_BINARY_DOWNLOAD_FOR_CI" ] ||
9
+ process . env [ "npm_config_native_image_diff_skip_binary_download_for_ci" ]
10
+ ) {
11
+ return ;
12
+ }
8
13
9
14
// Get the version of the library;
10
15
const pkg = require ( path . resolve ( __dirname , ".." , "package.json" ) ) ;
11
16
const packageVersion = pkg . version ;
12
- const baseUrl = process . env . NATIVE_IMAGE_DIFF_BINARY_URL || "https://github.com/Prior99/native-image-diff/releases/download" ;
17
+ const baseUrl =
18
+ process . env [ "NATIVE_IMAGE_DIFF_BINARY_URL" ] ||
19
+ process . env [ "npm_config_native_image_diff_binary_url" ] ||
20
+ "https://github.com/Prior99/native-image-diff/releases/download" ;
13
21
const url = `${ baseUrl } /${ packageVersion } /${ fileName . baseName } ` ;
14
22
15
23
console . info ( `Downloading native-image-diff prebuilt binary from "${ url } ".` ) ;
You can’t perform that action at this time.
0 commit comments