fix: error message for amplify init -y in already existing project
Description of changes
As of https://github.com/aws-amplify/amplify-cli/issues/11579 this PR introduces a more helpful message in case of running
amplify init -y
twice in the same directory or in a directory already containing a project.
Issue #, if available
https://github.com/aws-amplify/amplify-cli/issues/11579
Description of how you validated changes
I built the CLI and run it twice in another directory:
amplify init
amplify init -y
Checklist
- [x] PR description included
- [x]
yarn testpasses
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Codecov Report
Merging #12287 (badef01) into dev (984c0f8) will decrease coverage by
2.35%. The diff coverage is57.30%.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## dev #12287 +/- ##
==========================================
- Coverage 49.45% 47.11% -2.35%
==========================================
Files 692 837 +145
Lines 33424 38098 +4674
Branches 6840 7732 +892
==========================================
+ Hits 16529 17948 +1419
- Misses 15370 18508 +3138
- Partials 1525 1642 +117
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...mplify-appsync-simulator/src/resolvers/function.ts | 15.38% <ø> (ø) |
|
| ...s/amplify-appsync-simulator/src/type-definition.ts | 100.00% <ø> (ø) |
|
| ...sync-simulator/src/velocity/util/dynamodb-utils.ts | 6.55% <0.00%> (ø) |
|
| ...y-appsync-simulator/src/velocity/util/map-utils.ts | 10.00% <ø> (ø) |
|
| ...tor/src/velocity/util/transform/dynamodb-filter.ts | 4.93% <0.00%> (ø) |
|
| ...appsync-simulator/src/velocity/value-mapper/map.ts | 86.88% <ø> (ø) |
|
| ...ackages/amplify-category-auth/src/commands/auth.ts | 0.00% <0.00%> (ø) |
|
| ...ges/amplify-category-auth/src/commands/auth/add.ts | 0.00% <ø> (ø) |
|
| ...es/amplify-category-auth/src/commands/auth/help.ts | 0.00% <0.00%> (ø) |
|
| .../amplify-category-auth/src/commands/auth/import.ts | 0.00% <0.00%> (ø) |
|
| ... and 94 more |
... and 468 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@mikigraf Can you please address these comments? Thank you for your contribution.
Yes, I will do it this week
Yes, will do this week, sorry that it takes so long
@mikigraf thanks for the contribution! Thought to check in if you had time to write the test for this, let us know if you need anything