Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastlaneCore::ConfigItem with data type "Array" breaks when input includes a comma #7283

Closed
2 tasks done
jake opened this issue Dec 2, 2016 · 4 comments
Closed
2 tasks done

Comments

@jake
Copy link
Contributor

jake commented Dec 2, 2016

New Issue Checklist

Issue Description

I have a external testers group in Testflight named "OK, Dracula: Alpha". When I try to pass this as an option to pilot add --groups, it incorrectly splits the array by the comma, ignoring the fact I've quoted my input.

I'm still new to Fastlane, but it looks like the issue is this line:

return value.split(',') if value.kind_of?(String)

return value.split(',') if value.kind_of?(String)

That seems to be too naive an option split? What is the recommended way for ingesting an array on the command line, so that quoted input is respected as expected?

I presume this also affects any other uses of array command line inputs, but I only tested from this path.

Complete output when running fastlane, including the stack trace and command used

You can use: --capture_output as the last commandline argument to get that collected for you

Notice it splits on the comma, and (correctly) fails to match nonexistent "OK" group.

$ pilot add example@gmail.com --groups "OK, Dracula: Alpha"
[15:34:26]: Login to iTunes Connect (ios-dev@redacted.co)
[15:34:28]: Login successful
[15:34:29]: [example@gmail.com]: Group 'OK' not found for example@gmail.com

[!] Some operations failed: ["example@gmail.com"]

Escaping the comma doesn't help:

$ pilot add example@gmail.com --groups "OK\, Dracula: Alpha"
[15:42:01]: Login to iTunes Connect (ios-dev@redacted.co)
[15:42:03]: Login successful
[15:42:04]: [example@gmail.com]: Group 'OK\' not found for example@gmail.com

[!] Some operations failed: ["example@gmail.com"]

Environment

Please run fastlane env and copy the output below. This will help us help you 👍
If you used --capture_output option please remove this block - as it is already included there.

✅ fastlane environment ✅

Stack

Key Value
OS 10.11.6
Ruby 2.3.2
Bundler? false
Git git version 2.10.2
Installation Source ~/.rvm/gems/ruby-2.3.2/bin/fastlane
Host Mac OS X 10.11.6 (15G1108)
Ruby Lib Dir ~/.rvm/rubies/ruby-2.3.2/lib
OpenSSL Version OpenSSL 1.0.2j 26 Sep 2016
Is contained false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.1

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
ENV["SLACK_URL"] ||= "..."
fastlane_version "1.96.0"

def next_build_number
  Time.new.strftime("%y%m%d.%H%M%S")
end

def build_for(variant = nil)
  raise "variant required" if variant.nil?

  increment_build_number(
    xcodeproj: "Builds/#{variant}/Unity-iPhone.xcodeproj",
    build_number: next_build_number
  )

  gym(
    project: "Builds/#{variant}/Unity-iPhone.xcodeproj",
    output_directory: "./Builds"
  )
end

desc "Submit Internal Build to TestFlight"
lane :internal do |options|
  build_for(options[:variant])
  pilot(
    skip_waiting_for_build_processing: true
  )
end

desc "Submit External Build to TestFlight"
lane :external do |options|
  build_for(options[:variant])
  pilot(
    skip_waiting_for_build_processing: true,
    distribute_external: true,
    changelog: "Everything!"
  )
end

desc "Submit Build to App Store"
lane :store do |options|
  match(type: "appstore")
  build_for(options[:variant])
  deliver(force: true)
end

after_all do |lane, options|
  slack(
    message: "App posted beta to TestFlight",
    payload: {
      'Variant' => options[:variant]
    },
    icon_url: '...',
  )
end

error do |lane, exception, options|
  slack(
    message: "App posted beta to TestFlight with errors",
    success: false,
    payload: {
      'Variant' => options[:variant]
    },
    icon_url: '...',
  )
end
`./fastlane/Appfile`
...

fastlane gems

Gem Version Update-Status
credentials_manager 0.16.2 ✅ Up-To-Date
fastlane_core 0.57.2 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.0.2
executable-hooks 1.3.2
bundler-unload 1.0.2
rubygems-bundler 1.4.4
bundler 1.13.6
io-console 0.4.6
multi_json 1.12.1
highline 1.7.8
colored 1.2
commander 4.4.0
excon 0.54.0
rubyzip 1.1.7
plist 3.2.0
gh_inspector 1.0.2
security 0.1.3
credentials_manager 0.16.2
fastlane_core 0.57.2
json 2.0.2
CFPropertyList 2.3.3
claide 1.0.1
nanaimo 0.2.2
xcodeproj 1.4.1
word_wrap 1.0.0
unicode-display_width 1.1.1
terminal-table 1.7.3

generated on: 2016-12-02

@fastlane-bot
Copy link

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 👍

@jake
Copy link
Contributor Author

jake commented Jan 31, 2017

same result on fastlane-2.13.0

@fastlane-bot
Copy link

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 👍

@fastlane-bot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@fastlane fastlane locked and limited conversation to collaborators Jul 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants