Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_powerapps_and_flow_rp(settings, command_context):
# Get credentials
credentials = TokenManager().get_credentials()
# Get powerapps rp
powerapps_rp = PowerAppsRPBuilder.get_from_settings(
credentials=credentials,
settings=settings)
# Get flow rp
flow_rp = FlowRPBuilder.get_from_settings(
credentials=credentials,
settings=settings)
# If the file names are missing for the download command
# use default names
if command_context is _DOWNLOAD:
settings.api_properties = settings.api_properties or 'apiProperties.json'
settings.api_definition = settings.api_definition or 'apiDefinition.swagger.json'
settings.icon = settings.icon or 'icon.png'
# Prompt for environment for any
# operation other than `validate`
if command_context is not _VALIDATE:
prompt_for_environment(
settings=settings,
flow_rp=flow_rp)