Skip to content

Commit

Permalink
Show errors when NPM install fails
Browse files Browse the repository at this point in the history
  • Loading branch information
cllns committed Nov 7, 2023
1 parent 6f91d15 commit 31c4ded
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/hanami/cli/commands/gem/new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ def call(app:, head: HEAD_DEFAULT, skip_install: SKIP_INSTALL_DEFAULT, skip_asse

unless skip_assets
out.puts "Running npm install..."
system_call.call("npm", ["install"])
system_call.call("npm", ["install"]).tap do |result|
unless result.successful?
puts "NPM ERROR:"
puts result.err.lines.map {|line| line.prepend(" ")}
end
end
end

out.puts "Running Hanami install..."
Expand Down

0 comments on commit 31c4ded

Please sign in to comment.