]> git.openstreetmap.org Git - chef.git/commitdiff
Install a yarn wrapper to keep rails 7 happy
authorTom Hughes <tom@compton.nu>
Thu, 17 Feb 2022 00:18:24 +0000 (00:18 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 17 Feb 2022 00:20:29 +0000 (00:20 +0000)
cookbooks/nodejs/recipes/default.rb
cookbooks/nodejs/templates/default/yarn.erb [new file with mode: 0644]

index ac82c3c98aa033bb80b94a523e3f7d65cb258b96..5f8ca526b4f6b0e491af932a1f2614576d13d377 100644 (file)
@@ -23,3 +23,10 @@ package %w[
   g++
   make
 ]
+
+template "/usr/local/bin/yarn" do
+  source "yarn.erb"
+  owner "root"
+  group "root"
+  mode "755"
+end
diff --git a/cookbooks/nodejs/templates/default/yarn.erb b/cookbooks/nodejs/templates/default/yarn.erb
new file mode 100644 (file)
index 0000000..b9d3b4e
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /usr/bin/yarnpkg --ignore-engines "$@"