lib/eco/cli_default/options.rb in eco-helpers-3.0.20 vs lib/eco/cli_default/options.rb in eco-helpers-3.0.21
- old
+ new
@@ -67,10 +67,13 @@
options_set.add("-schema-id", desc) do |options, session|
sch_name = SCR.get_arg("-schema-id", with_param: true)
sch_id = session.schemas.to_id(sch_name)
unless sch_id
- msg = "You need to specify a correct schema id or name. '#{sch_name}' does not exist"
+ msg = "You need to specify a correct schema id or name. "
+ msg << "'#{sch_name}' does not exist. Correct options are: "
+ msg << session.schemas.map(&:name).join(", ")
+
session.log(:error) { msg }
exit(1)
end
options.deep_merge!(people: {filter: {details: {schema_id: sch_id}}})
session.log(:info) {