Skip to content

Commit

Permalink
Trim whitespace of output
Browse files Browse the repository at this point in the history
  • Loading branch information
c0untingNumbers committed Nov 9, 2024
1 parent e3e1502 commit f2375f4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions helpers/openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package helpers

import (
"bytes"
"fmt"
"io"
"os"
"os/exec"
Expand Down Expand Up @@ -127,11 +126,9 @@ func DebugCheckIfExists(s *discordgo.Session, user *discordgo.User, span ddtrace
}

logging.Debug(s, combinedOutput.String(), user, span)
logging.Debug(s, fmt.Sprintf("combinedOutput type: %T", combinedOutput.String()), user, span)
output := stdout.String()
logging.Debug(s, fmt.Sprintf("Output type: %T", output), user, span)
output := strings.TrimSpace(stdout.String())

if string(output) == "0" {
if output == "0" {
return false, nil
} else {
return true, nil
Expand Down

0 comments on commit f2375f4

Please sign in to comment.