public async getDefaultContainerAppLocation()

in src/ContainerAppHelper.ts [274:285]


    public async getDefaultContainerAppLocation(): Promise<string> {
        toolHelper.writeDebug(`Attempting to get the default location for the Container App service for the subscription.`);
        try {
            let command = `az provider show -n Microsoft.App --query "resourceTypes[?resourceType=='containerApps'].locations[] | [0]"`
            let executionResult = await util.execute(command);
            // If successful, strip out double quotes, spaces and parentheses from the first location returned
            return executionResult.exitCode === 0 ? executionResult.stdout.toLowerCase().replace(/["() ]/g, "").trim() : `eastus2`;
        } catch (err) {
            toolHelper.writeInfo(err.message);
            return `eastus2`;
        }
    }