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/yarn13
1 files changed, 13 insertions, 0 deletions
diff --git a/activestorage/test/dummy/bin/yarn b/activestorage/test/dummy/bin/yarn
new file mode 100755
index 0000000000..c9b7498378
--- /dev/null
+++ b/activestorage/test/dummy/bin/yarn
@@ -0,0 +1,13 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+VENDOR_PATH = File.expand_path("..", __dir__)
+Dir.chdir(VENDOR_PATH) do
+ begin
+ 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
+end