Skip to content

Commit

Permalink
Maintenance: Validate ExecJS runtime in the development environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Mar 7, 2024
1 parent e5a11a8 commit 5f0e542
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/initializers/validate_execjs_engine.rb
@@ -0,0 +1,5 @@
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/

if Rails.env.development? && (ExecJS.runtime&.name != 'Node.js (V8)')
raise "The CoffeeScript assets cannot be compiled with the installed JS runtime '#{ExecJS.runtime.name}'. Please use Node.js instead."
end

0 comments on commit 5f0e542

Please sign in to comment.