aboutsummaryrefslogtreecommitdiffstats
path: root/test/dummy/bin/yarn
diff options
context:
space:
mode:
authorDino Maric <dino.onex@gmail.com>2017-07-27 22:15:38 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2017-07-27 15:15:38 -0500
commite64e3f14fd255d91ac0aa7a272741df08da82701 (patch)
tree1fccbf0786ae9f981eae1b8cb736856b50479c23 /test/dummy/bin/yarn
parent293db49b7f5969d11d5599f97bd968dbe64c7f8b (diff)
downloadrails-e64e3f14fd255d91ac0aa7a272741df08da82701.tar.gz
rails-e64e3f14fd255d91ac0aa7a272741df08da82701.tar.bz2
rails-e64e3f14fd255d91ac0aa7a272741df08da82701.zip
Introduce the Dummy. (#70)
Diffstat (limited to 'test/dummy/bin/yarn')
-rwxr-xr-xtest/dummy/bin/yarn11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/dummy/bin/yarn b/test/dummy/bin/yarn
new file mode 100755
index 0000000000..c2bacef836
--- /dev/null
+++ b/test/dummy/bin/yarn
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+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