Skip to content

Commit 112b82a

Browse files
committed
Do not read trailing newlines in test_password_file
1 parent 61bcfe0 commit 112b82a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def self.run(params)
8888
get_value_from_value_or_file(params[:test_devices], params[:test_devices_file])
8989
if present?(test_devices)
9090
UI.message("🤖 Starting automated tests. Note: This feature is in beta.")
91-
test_password = get_value_from_value_or_file(params[:test_password], params[:test_password_file])
91+
test_password = test_password_from_params(params)
9292
release_test = test_release(alpha_client, release, test_devices, params[:test_username], test_password, params[:test_username_resource], params[:test_password_resource])
9393
unless params[:test_non_blocking]
9494
poll_test_finished(alpha_client, release_test.name)
@@ -134,6 +134,12 @@ def self.details
134134
"Release your beta builds with Firebase App Distribution"
135135
end
136136

137+
def self.test_password_from_params(params)
138+
test_password = get_value_from_value_or_file(params[:test_password], params[:test_password_file])
139+
# Remove trailing newline if present
140+
test_password && test_password.sub(/\r?\n$/, "")
141+
end
142+
137143
def self.app_id_from_params(params)
138144
if params[:app]
139145
app_id = params[:app]

0 commit comments

Comments
 (0)