-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathyarn-4-fixes.patch
More file actions
59 lines (53 loc) · 1.78 KB
/
yarn-4-fixes.patch
File metadata and controls
59 lines (53 loc) · 1.78 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff --git a/build/runner/src/yarn.rs b/build/runner/src/yarn.rs
index 7724ed04a..8b145df82 100644
--- a/build/runner/src/yarn.rs
+++ b/build/runner/src/yarn.rs
@@ -18,22 +18,7 @@ pub struct YarnArgs {
pub fn setup_yarn(args: YarnArgs) {
link_node_modules();
- if env::var("OFFLINE_BUILD").is_ok() {
- println!("OFFLINE_BUILD is set");
- println!("Running yarn with '--offline' and '--ignore-scripts'.");
- run_command(
- Command::new(&args.yarn_bin)
- .arg("install")
- .arg("--offline")
- .arg("--ignore-scripts"),
- );
- } else {
- run_command(
- Command::new(&args.yarn_bin)
- .arg("install")
- .arg("--immutable"),
- );
- }
+ run_command(Command::new(&args.yarn_bin).arg("install"));
std::fs::write(args.stamp, b"").unwrap();
}
index 38baa8f62..3bdcc5f20 100644
--- a/build/ninja_gen/src/node.rs
+++ b/build/ninja_gen/src/node.rs
@@ -49,11 +49,7 @@ pub struct YarnSetup {}
impl BuildAction for YarnSetup {
fn command(&self) -> &str {
- if cfg!(windows) {
- "corepack.cmd enable yarn"
- } else {
- "corepack enable yarn"
- }
+ return "true"
}
fn files(&mut self, build: &mut impl build::FilesHandle) {
@@ -135,11 +131,11 @@ pub fn setup_node(
};
build.add_dependency("node_binary", node_binary);
- match std::env::var("YARN_BINARY") {
+ match std::env::var("ANKI_YARN_BINARY") {
Ok(path) => {
assert!(
Utf8Path::new(&path).is_absolute(),
- "YARN_BINARY must be absolute"
+ "ANKI_YARN_BINARY must be absolute"
);
build.add_dependency("yarn:bin", inputs![path]);
}