Skip to content

Commit 37fa0e6

Browse files
authored
If build command fails raise a helpful exception (#37)
1 parent 122f356 commit 37fa0e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/tasks/jsbundling/build.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
namespace :javascript do
22
desc "Build your JavaScript bundle"
33
task :build do
4-
system "yarn install && yarn build"
4+
unless system "yarn install && yarn build"
5+
raise "jsbundling-rails: Command build failed, ensure yarn is installed and `yarn build` runs without errors"
6+
end
57
end
68
end
79

0 commit comments

Comments
 (0)