Skip to content

Fix lint issues #13

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

Merged
merged 1 commit into from
May 11, 2025
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
2 changes: 0 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ var rootCmd = &cobra.Command{
Use: "aws-cli-manager",
Short: "AWS CLI Manager is a tool to manage AWS CLI profiles",
Run: func(cmd *cobra.Command, args []string) {
// SelectProfile now returns a boolean indicating whether a profile was selected
// We don't need to do anything with the return value here
profile.SelectProfile()
},
}
Expand Down
8 changes: 2 additions & 6 deletions cmd/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ var selectCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
// If no profile is specified, show the selection menu
// SelectProfile now returns a boolean indicating whether a profile was selected
selected := profile.SelectProfile()
if !selected {
// User cancelled the selection with Ctrl+C
return
}
// SelectProfile returns false if user cancels with Ctrl+C
profile.SelectProfile()
} else {
// If a profile is specified, select it directly
profileName := args[0]
Expand Down
2 changes: 1 addition & 1 deletion pkg/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func ListProfiles() {

// Fill the table with the profiles
for awsProfile, details := range awsProfiles.Profiles {
ssoStatus := "No"
var ssoStatus string
if details.SSOEnabled {
ssoStatus = color.GreenString("Yes")
} else {
Expand Down
9 changes: 5 additions & 4 deletions pkg/installer/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,14 @@ func installAWSCLI() {

osSystem := detectOS()

if osSystem == "darwin" {
switch osSystem {
case "darwin":
installAWSCLIMac()
} else if osSystem == "linux" {
case "linux":
installAWSCLILinux()
} else if osSystem == "windows" {
case "windows":
installAWSCLIWindows()
} else {
default:
message := fmt.Errorf("unsupported OS detected, please use MacOS, Linux or Windows")
log.Fatalf("%v", message)
}
Expand Down