Skip to content

Commit 8b855b9

Browse files
authored
Use crash! instead of user_error! on configuration access mis-use (fastlane#13766)
Since those methods are mostly used internally and for plugins, this will make debugging easier, as the crash will show the full stack trace, instead of just the error message
1 parent b5e5a7e commit 8b855b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fastlane_core/lib/fastlane_core/configuration/configuration.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def self.find_configuration_file_path(config_file_name: nil)
211211
# if 'ask' is true and the value is not present, the user will be prompted to provide a value
212212
# rubocop:disable Metrics/PerceivedComplexity
213213
def fetch(key, ask: true)
214-
UI.user_error!("Key '#{key}' must be a symbol. Example :app_id.") unless key.kind_of?(Symbol)
214+
UI.crash!("Key '#{key}' must be a symbol. Example :app_id.") unless key.kind_of?(Symbol)
215215

216216
option = verify_options_key!(key)
217217

@@ -263,7 +263,7 @@ def fetch(key, ask: true)
263263
# Overwrites or sets a new value for a given key
264264
# @param key [Symbol] Must be a symbol
265265
def set(key, value)
266-
UI.user_error!("Key '#{key}' must be a symbol. Example :#{key}.") unless key.kind_of?(Symbol)
266+
UI.crash!("Key '#{key}' must be a symbol. Example :#{key}.") unless key.kind_of?(Symbol)
267267
option = option_for_key(key)
268268

269269
unless option

0 commit comments

Comments
 (0)