Skip to content

Commit 6878af2

Browse files
authored
Merge pull request #347 from carapace-sh/fix/customizations-30128881863
fix: adapt customizations for AWS CLI 2.36.8
2 parents 380fb92 + e63bc0e commit 6878af2

5 files changed

Lines changed: 28 additions & 1 deletion

File tree

cmd/carapace-aws/cmd/botocore/aws.codecommit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,14 @@ commands:
188188
- name: credential-helper
189189
description: Provide a SigV4 compatible user name and password for git smart HTTP.
190190
commands:
191+
- name: erase
192+
description: Erase is a no-op.
191193
- name: get
192194
description: Get a username SigV4 credential pair based on protocol, host and path provided from standard in.
193195
flags:
194196
--ignore-host-check: Generate credentials regardless of whether the domain is an Amazon domain.
197+
- name: store
198+
description: Store is a no-op.
195199
- name: delete-approval-rule-template
196200
description: Deletes a specified approval rule template.
197201
flags:

cmd/carapace-aws/cmd/botocore/aws.ec2.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15113,7 +15113,6 @@ commands:
1511315113
--generate-cli-skeleton: Prints a JSON skeleton to standard output without sending an API request.
1511415114
--instance-id=!: The ID of the Windows instance.
1511515115
--no-dry-run: Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response.
15116-
--priv-launch-key=: The file that contains the private key used to launch the instance
1511715116
- name: secondary-network-create-complete
1511815117
description: Describes one or more secondary networks.
1511915118
flags:

cmd/carapace-aws/cmd/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func init() {
9494
"history",
9595
"login",
9696
"logout",
97+
"update",
9798
} {
9899
subCmd := &cobra.Command{
99100
Use: extension,

cmd/carapace-spec-botocore/cmd/customizations/codecommit/aws.codecommit.credential-helper.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ documentation:
99
Get is operation to generate credentials to authenticate AWS CodeCommit.
1010
Run “aws codecommit credential-helper help” for details
1111
commands:
12+
- name: erase
13+
description: Erase is a no-op.
1214
- name: get
1315
description: Get a username SigV4 credential pair based on protocol, host and path provided from standard in.
1416
flags:
@@ -17,4 +19,6 @@ commands:
1719
command: |
1820
Get a username SigV4 credential pair based on protocol, host and path provided from standard in.
1921
This is primarily called by git to generate credentials to authenticate against AWS CodeCommit
22+
- name: store
23+
description: Store is a no-op.
2024

cmd/carapace-spec-botocore/cmd/customizations/ec2.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ import (
77
)
88

99
func init() {
10+
customizations["ec2"] = func(cmd *command.Command) error {
11+
for i := range cmd.Commands {
12+
if cmd.Commands[i].Name == "wait" {
13+
for j := range cmd.Commands[i].Commands {
14+
if cmd.Commands[i].Commands[j].Name == "password-data-available" {
15+
flags := make(command.FlagSet)
16+
for k, v := range cmd.Commands[i].Commands[j].Flags {
17+
if k != "--priv-launch-key=" {
18+
flags[k] = v
19+
}
20+
}
21+
cmd.Commands[i].Commands[j].Flags = flags
22+
}
23+
}
24+
}
25+
}
26+
return nil
27+
}
28+
1029
customizations["ec2.modify-instance-attribute"] = func(cmd *command.Command) error {
1130
delete(cmd.Flags, "--enable-api-termination") // TODO should be this but seems awscli is missing the rename here
1231
cmd.AddFlag(command.Flag{

0 commit comments

Comments
 (0)