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

[action][git_add] remove all instances of is_string in options and use type #18882

Merged
merged 5 commits into from Jun 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 5 additions & 10 deletions fastlane/lib/fastlane/actions/git_add.rb
Expand Up @@ -8,13 +8,9 @@ def self.run(params)
paths = params[:pathspec]
success_message = "Successfully added from \"#{paths}\" 💾."
elsif params[:path]
if params[:path].kind_of?(String)
paths = shell_escape(params[:path], should_escape)
elsif params[:path].kind_of?(Array)
paths = params[:path].map do |p|
shell_escape(p, should_escape)
end.join(' ')
end
paths = params[:path].map do |p|
shell_escape(p, should_escape)
end.join(' ')
success_message = "Successfully added \"#{paths}\" 💾."
else
paths = "."
Expand Down Expand Up @@ -43,18 +39,17 @@ def self.available_options
[
FastlaneCore::ConfigItem.new(key: :path,
description: "The file(s) and path(s) you want to add",
is_string: false,
type: Array,
conflicting_options: [:pathspec],
optional: true),
FastlaneCore::ConfigItem.new(key: :shell_escape,
description: "Shell escapes paths (set to false if using wildcards or manually escaping spaces in :path)",
is_string: false,
type: Boolean,
default_value: true,
optional: true),
# Deprecated
FastlaneCore::ConfigItem.new(key: :pathspec,
description: "The pathspec you want to add files from",
is_string: true,
conflicting_options: [:path],
optional: true,
deprecated: "Use `--path` instead")
Expand Down