aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/dummy/bin/yarn
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/test/dummy/bin/yarn')
-rwxr-xr-xactivestorage/test/dummy/bin/yarn11
1 files changed, 11 insertions, 0 deletions
diff --git a/activestorage/test/dummy/bin/yarn b/activestorage/test/dummy/bin/yarn
new file mode 100755
index 0000000000..d0dd7c27ac
--- /dev/null
+++ b/activestorage/test/dummy/bin/yarn
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+VENDOR_PATH = File.expand_path("..", __dir__)
+Dir.chdir(VENDOR_PATH) do
+ exec "yarnpkg #{ARGV.join(" ")}"
+rescue Errno::ENOENT
+ $stderr.puts "Yarn executable was not detected in the system."
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
+ exit 1
+end