Skip to content

Commit 9a8bb0f

Browse files
mokagioAliSoftware
andauthored
Rework api_key_path assignment with if-else
Co-authored-by: Olivier Halligon <[email protected]>
1 parent 1784918 commit 9a8bb0f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

fastlane/Fastfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -939,13 +939,14 @@ platform :ios do
939939
#
940940
# @option [Boolean] readonly (default: true) Whether to only fetch existing certificates and profiles, without generating new ones.
941941
private_lane :alpha_code_signing do |options|
942-
api_key_path = ASC_KEY_PATH
943942
readonly = options.fetch(:readonly, true)
944943

945-
unless readonly
944+
if readonly
945+
# In readonly mode, we can use the API key
946+
api_key_path = ASC_KEY_PATH
947+
else
946948
# The Enterprise account APIs do not support authentication via API key.
947-
# If we want to modify data (readonly = false) we need to authenticate
948-
# manually.
949+
# If we want to modify data (readonly = false) we need to authenticate manually.
949950
prompt_user_for_app_store_connect_credentials
950951
# We also need to pass no API key path, otherwise Fastlane will give
951952
# precedence to that authentication mode.

0 commit comments

Comments
 (0)