Skip to content

Commit

Permalink
fix: fix configure project and custom policies api containers (#8703)
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarkarachi authored and kaustavghosh06 committed Nov 11, 2021
1 parent c16d749 commit 4c744bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
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:')
.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

0 comments on commit 4c744bc

Please sign in to comment.