From 210b2d8599c4c146be1c9bfa8246c166d1755ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erdem=20Pers=CC=A7embe?= Date: Thu, 31 Oct 2024 17:01:56 +0300 Subject: [PATCH] Return directly app url on successfull response File upload should return app_url instead of custom_id --- .../plugin/browserstack/helper/browserstack_helper.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/fastlane/plugin/browserstack/helper/browserstack_helper.rb b/lib/fastlane/plugin/browserstack/helper/browserstack_helper.rb index 0b5f432..05513a2 100644 --- a/lib/fastlane/plugin/browserstack/helper/browserstack_helper.rb +++ b/lib/fastlane/plugin/browserstack/helper/browserstack_helper.rb @@ -44,12 +44,7 @@ def self.upload_file(browserstack_username, browserstack_access_key, file_path, ) response_json = JSON.parse(response.to_s) - - if !response_json["custom_id"].nil? - return response_json["custom_id"] - else - return response_json["app_url"] - end + return response_json["app_url"] rescue RestClient::ExceptionWithResponse => err begin error_response = JSON.parse(err.response.to_s)["error"]