8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/cocoapods-azure-universal-packages2/pre_install.rb', line 8
def pre_install(options)
raise Pod::Informative, 'Unable to locate the Azure CLI. To learn more refer to https://aka.ms/azcli' unless Pod::Executable.which('az')
Pod::Executable.execute_command('az', ['extension', 'add', '--yes', '--name', 'azure-devops'], false)
if options.fetch(:update_cli_extension, false)
Pod::Executable.execute_command('az', ['extension', 'update', '--name', 'azure-devops'], false)
end
azure_organizations = options[:organization] || options[:organizations]
raise Pod::Informative, 'You must configure at least one Azure organization' unless azure_organizations
Pod::Downloader.azure_organizations = ([] << azure_organizations).flatten.map { |url| url.delete_suffix('/') }
raise Pod::Informative, 'You must configure at least one Azure organization' if Pod::Downloader.azure_organizations.empty?
end
|