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

fix(cli): rewire override project to override rootStack internally #8703

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/amplify-cli/src/input-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getCommandLineInput(pluginPlatform: PluginPlatform): Input {
/* tslint:disable */
if (result.argv && result.argv.length > 2) {
let index = 2;

aliasArgs(result.argv);
// pick up plugin name, allow plugin name to be in the 2nd or 3rd position
const pluginNames = getAllPluginNames(pluginPlatform);

Expand Down Expand Up @@ -193,3 +193,9 @@ export function verifyInput(pluginPlatform: PluginPlatform, input: Input): Input

return result;
}

function aliasArgs(argv: string[]) {
if (argv.length >= 4 && argv[2] === 'override' && argv[3] === 'project') {
argv[3] = 'root';
}
}
2 changes: 1 addition & 1 deletion packages/amplify-e2e-core/src/categories/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ export function rebuildApi(projDir: string, apiName: string) {
export function addRestContainerApiForCustomPolicies(projectDir: string, settings: { name: string }) {
return new Promise<void>((resolve, reject) => {
spawn(getCLIPath(), ['add', 'api'], { cwd: projectDir, stripColors: true })
.wait('Please select from one of the below mentioned services:')
.wait('Select from one of the below mentioned services:')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we reverted this change? Can you confirm once

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see it in extOverrides

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

.sendKeyDown()
.sendCarriageReturn()
.wait('Which service would you like to use')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "awscloudformation",
"aliases": ["awscfn", "aws", "root", "project"],
"aliases": ["awscfn", "aws", "root"],
"type": "provider",
"commands": ["configure", "console", "reset-cache", "setupNewUser", "help", "override"],
"commandAliases": {
Expand Down