Skip to content

Commit

Permalink
feat: make el2g config-aws-iot work on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Detsch <[email protected]>
  • Loading branch information
detsch committed Jul 19, 2023
1 parent e806793 commit 542a28f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions subcommands/el2g/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"os"
"os/exec"
"runtime"

"github.com/foundriesio/fioctl/subcommands"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -62,6 +63,9 @@ func doAwsIOT(cmd *cobra.Command, args []string) {
}

func run(args ...string) map[string]string {
if runtime.GOOS == "windows" && args[0] == "/usr/bin/env" {
args = args[1:]
}
cmd := exec.Command(args[0], args[1:]...)
var out bytes.Buffer
cmd.Stdout = &out
Expand Down

0 comments on commit 542a28f

Please sign in to comment.