MCPcopy Create free account
hub / github.com/auth0/auth0-cli / openManageURL

Function openManageURL

internal/cli/utils_shared.go:321–338  ·  view source on GitHub ↗
(cli *cli, tenant string, path string)

Source from the content-addressed store, hash-verified

319}
320
321func openManageURL(cli *cli, tenant string, path string) {
322 manageTenantURL := formatManageTenantURL(tenant, &cli.Config)
323 if len(manageTenantURL) == 0 || len(path) == 0 {
324 cli.renderer.Warnf("Failed to format the correct URL, please ensure you have run 'auth0 login' and try again.")
325 return
326 }
327
328 settingsURL := fmt.Sprintf("%s%s", manageTenantURL, path)
329
330 if cli.noInput {
331 cli.renderer.Infof("Open the following URL in a browser: %s", settingsURL)
332 return
333 }
334
335 if err := browser.OpenURL(settingsURL); err != nil {
336 cli.renderer.Warnf("Couldn't open the URL, please do it manually: %s", settingsURL)
337 }
338}
339
340func formatManageTenantURL(tenant string, cfg *config.Config) string {
341 if len(tenant) == 0 {

Callers 7

openUserCmdFunction · 0.85
openActionCmdFunction · 0.85
openAppCmdFunction · 0.85
openTenantCmdFunction · 0.85
openAPICmdFunction · 0.85
openOrganizationCmdFunction · 0.85
openLogStreamsCmdFunction · 0.85

Calls 3

formatManageTenantURLFunction · 0.85
WarnfMethod · 0.80
InfofMethod · 0.80

Tested by

no test coverage detected