UNPKG

azure-cli

Version:

Microsoft Azure Cross Platform Command Line tool

48 lines (16 loc) 1.41 kB
/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb; var profile = require("../util/profile"); var utils = require("../util/utils"); var $ = utils.getLocaleString; exports.init = function(cli) { cli.command("portal").description($("Open the portal in a browser")).option("-e, --environment <environment>", $("the publish settings download environment")).option("-r, --realm <realm>", $("the organization's realm")).execute(function __1(options, _) { var environmentName, targetEnvironment, subscription, targetUrl; var __frame = { name: "__1", line: 27 }; return __func(_, this, arguments, __1, 1, __frame, function __$__1() { environmentName = options.environment; if (!environmentName) { subscription = profile.current.getSubscription(options.subscription); if (subscription) { targetEnvironment = subscription.environment; } else { targetEnvironment = profile.current.getDefaultEnvironment(); } ; } else { targetEnvironment = profile.current.getEnvironment(environmentName); } ; targetUrl = targetEnvironment.getPortalUrl(options.realm); return cli.interaction.launchBrowser(targetUrl, __cb(_, __frame, 20, 22, function __$__1() { _(); }, true)); }); });};