Skip to content

Commit

Permalink
remove run elevated
Browse files Browse the repository at this point in the history
Signed-off-by: liam.baker <[email protected]>
  • Loading branch information
liam.baker committed Jan 3, 2024
1 parent 350e3c2 commit 640a805
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions cmd/system/aws_cli.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package system

import (
"bufio"
"bytes"
"context"
"encoding/json"
Expand All @@ -25,8 +24,6 @@ import (
"github.com/spf13/cobra"
)

var runElevated bool

type ReferenceObject struct {
Type string `json:"tag,omitempty"`
}
Expand Down Expand Up @@ -54,18 +51,6 @@ func MakeInstallAWSCLI() *cobra.Command {
command.Flags().Bool("run-installer", true, "Whether or not arkade should run the downloaded installer")

command.PreRunE = func(cmd *cobra.Command, args []string) error {
fmt.Printf("Allow arkade to perform an elevated install (i.e. sudo)?\n\n")
fmt.Println("Enter a value: ")
reader := bufio.NewReader(os.Stdin)
input, err := reader.ReadString('\n')
if err != nil {
return err
}

if strings.EqualFold(input, "yes") {
runElevated = true
}

return nil
}

Expand Down Expand Up @@ -179,7 +164,7 @@ func MakeInstallAWSCLI() *cobra.Command {
workDir = unpackPath
}

if runInstaller && runElevated {
if runInstaller {
if err := runBundledInstaller(osVer, workDir, filename, installPath); err != nil {
return err
}
Expand Down

0 comments on commit 640a805

Please sign in to comment.