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
refactor(CLI): Report credentials
source in modern error output
#10114
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10114 +/- ##
=======================================
Coverage 85.26% 85.27%
=======================================
Files 334 335 +1
Lines 13638 13687 +49
=======================================
+ Hits 11628 11671 +43
- Misses 2010 2016 +6
Continue to review full report at Codecov.
|
lib/cli/handle-error.js
Outdated
if (serverless && serverless.service.provider.name === 'aws') { | ||
const credentials = serverless.getProvider('aws').cachedCredentials; | ||
if (credentials) { | ||
if (credentials.dashboardProviderAlias && serverless.pluginManager.dashboardPlugin) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't checking credentials.dashboardProviderAlias
be good enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to be extra sure with checking if dashboardPlugin
instance is available as well, but I think there shouldn't be any situations when that wouldn't be the case
edit: changed
7698bd6
to
9d49a54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 👍
Addresses: #9860