summaryrefslogtreecommitdiff
path: root/yarn-offline.patch
blob: 965109b173faad1bd198e865305a88412ce4cd97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- prepare_vscode.sh
+++ prepare_vscode.sh
@@ -78,9 +78,9 @@ if [[ "${OS_NAME}" == "linux" ]]; then
     export npm_config_arm_version=7
   fi

-  CHILD_CONCURRENCY=1 yarn --frozen-lockfile --check-files --network-timeout 180000
+  CHILD_CONCURRENCY=1 yarn --frozen-lockfile --check-files --offline
 elif [[ "${OS_NAME}" == "osx" ]]; then
-  CHILD_CONCURRENCY=1 yarn --frozen-lockfile --network-timeout 180000
+  CHILD_CONCURRENCY=1 yarn --frozen-lockfile --offline

   yarn postinstall
 else
@@ -105,7 +105,7 @@ else
     export npm_config_arm_version=7
   fi

-  CHILD_CONCURRENCY=1 yarn --frozen-lockfile --check-files --network-timeout 180000
+  CHILD_CONCURRENCY=1 yarn --frozen-lockfile --check-files --offline
 fi

 setpath() {
--- vscode/build/npm/postinstall.js.orig	2024-08-07 09:57:47.195493488 +0800
+++ vscode/build/npm/postinstall.js	2024-08-07 10:02:27.794019375 +0800
@@ -42,7 +42,7 @@
 	const raw = process.env['npm_config_argv'] || '{}';
 	const argv = JSON.parse(raw);
 	const original = argv.original || [];
-	const args = original.filter(arg => arg === '--ignore-optional' || arg === '--frozen-lockfile' || arg === '--check-files');
+	const args = original.filter(arg => arg === '--ignore-optional' || arg === '--frozen-lockfile' || arg === '--check-files').concat(['--offline']);
 
 	if (opts.ignoreEngines) {
 		args.push('--ignore-engines');