fix(CLI): Do not attempt to resolve full config for login

This commit is contained in:
Piotr Grzesik 2022-04-07 14:51:22 +02:00
parent cf482f0170
commit 9b62d14e69

View File

@ -235,6 +235,12 @@ processSpanPromise = (async () => {
// IIFE for maintenance convenience
await (async () => {
// We do not need to attempt resolution of further variables for login command as the only variable from configuration that we
// potentially rely on is `console`
// TODO: Remove when dashboard/console triage won't be needed - when that happens
// login command should once again be service independent
if (command === 'login') return;
processLog.debug('resolve variables meta');
const resolveVariablesMeta = require('../lib/configuration/variables/resolve-meta');
@ -474,6 +480,8 @@ processSpanPromise = (async () => {
if (!ensureResolvedProperty('frameworkVersion')) return;
if (!ensureResolvedProperty('app')) return;
if (!ensureResolvedProperty('org')) return;
if (!ensureResolvedProperty('dashboard')) return;
if (!ensureResolvedProperty('console')) return;
if (!ensureResolvedProperty('service')) return;
if (isDashboardEnabled({ configuration, options })) {
// Dashboard requires AWS region to be resolved upfront
@ -574,6 +582,13 @@ processSpanPromise = (async () => {
// IIFE for maintanance convenience
await (async () => {
if (!configuration) return;
// We do not need to attempt resolution of further variables for login command as the only variable from configuration that we
// potentially rely on is `console`
// TODO: Remove when dashboard/console triage won't be needed - when that happens
// login command should once again be service independent
if (command === 'login') return;
let hasFinalCommandSchema = false;
if (configuration.plugins) {
// After plugins are loaded, re-resolve CLI command and options schema as plugin