You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the same issue as #7283. I used pilot and gave a group name Staff, Family & Friends to it.
upload_to_testflight(groups: "Staff, Family & Friends",distribute_external: true,// ...
)
I understand this is my mistake passing a String to the option expecting Array. However, this should have raised an error based on the validation defined on the option. There is a code to check if the given value is Array.
description: "Associate tester to one group or more by group name / group id. E.g. `-g \"Team 1\",\"Team 2\"` This is required when `distribute_external` option is set to true or when we want to add a tester to one or more external testing groups ",
optional: true,
type: Array,
verify_block: procdo |value|
UI.user_error!("Could not evaluate array from '#{value}'")unlessvalue.kind_of?(Array)
end),
This didn't work because fastlane does convert input value based on each option's type info and then calls the validation. In my case, my input value as a string literal "Staff, Family & Friends" was first split into Array and then passed the validation.
It seems like you have not included the output of fastlane env
To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env 👍
ainame
changed the title
Passing a String including a comma doesn't fail validation on an option that expects Array
Passing a String including a comma doesn't fail in validation on an option that expects Array
Oct 14, 2022
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪
This issue will be auto-closed if there is no reply within 1 month.
New Issue Checklist
Issue Description
I had the same issue as #7283. I used
pilot
and gave a group nameStaff, Family & Friends
to it.I understand this is my mistake passing a
String
to the option expectingArray
. However, this should have raised an error based on the validation defined on the option. There is a code to check if the given value isArray
.fastlane/pilot/lib/pilot/options.rb
Lines 246 to 254 in 950bb82
This didn't work because fastlane does convert input value based on each option's type info and then calls the validation. In my case, my input value as a string literal
"Staff, Family & Friends"
was first split intoArray
and then passed the validation.fastlane/fastlane_core/lib/fastlane_core/configuration/configuration.rb
Lines 80 to 89 in 950bb82
I'd say I expect that fastlane will fail with it. I'll explore if we can improve this 🙏
Complete output when running fastlane, including the stack trace and command used
There's no useful information as
upload_to_testflight
just succeeded but it didn't assign a tester group to the build.Environment
✅ fastlane environment ✅
fastlane 2.210.1
Stack
System Locale
The text was updated successfully, but these errors were encountered: