Skip to content

Commit b8e5270

Browse files
committed
Trim space before trim '"' in terraform output.
1 parent 5c967e1 commit b8e5270

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

util/node.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ func IP(name string) (string, error) {
9090

9191
cmd := fmt.Sprintf("cd %v && terraform output ip", NodePath(name))
9292
ip, err := CommandOutput(cmd)
93+
ip = strings.TrimSpace(ip)
9394
if strings.HasPrefix(ip, "\"") {
9495
ip = strings.Trim(ip, "\"")
9596
}
96-
return strings.TrimSpace(ip), err
97+
return ip, err
9798
}
9899

99100
// Version gets the version of the software the darknode currently is running.

0 commit comments

Comments
 (0)