Просмотр исходного кода

Maintenance: Validate ExecJS runtime in the development environment.

Martin Gruner 1 год назад
Родитель
Сommit
5f0e5420cd
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      config/initializers/validate_execjs_engine.rb

+ 5 - 0
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