Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Fix support for -c (--config) shortcut #10607

Merged
merged 1 commit into from Jan 31, 2022
Merged

Conversation

medikoo
Copy link
Contributor

@medikoo medikoo commented Jan 31, 2022

Regression was accidentally introduced with #10332.

Back in v2, the resolution of -c/--config was hardcoded into lib/cli/resolve-input.js. While in v3 it was generalized, and co-relies on schema, which defines this option only for service specific commands.

Having that -c shortcut stopped being recognized on time, as initial CLI flags resolution (which precedes configuration file resolution), loads schema only for non-service command flags

This patch ensures that before we attempt to resolve configuration filename, we have flags common for service specific commands also loaded from schema

Closes: #10601

@codecov
Copy link

codecov bot commented Jan 31, 2022

Codecov Report

Merging #10607 (052ebc2) into main (0c2026c) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #10607      +/-   ##
==========================================
- Coverage   85.98%   85.98%   -0.01%     
==========================================
  Files         330      330              
  Lines       12469    12468       -1     
==========================================
- Hits        10721    10720       -1     
  Misses       1748     1748              
Impacted Files Coverage Δ
scripts/serverless.js 62.94% <100.00%> (-0.14%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c2026c...052ebc2. Read the comment docs.

@medikoo medikoo requested a review from pgrzesik January 31, 2022 14:50
Copy link
Contributor

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍

@medikoo medikoo merged commit 06fc4df into main Jan 31, 2022
@medikoo medikoo deleted the 0131-fix-config-handling branch January 31, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

config flag shorthand not working with v3
2 participants