Closed picatz closed 9 months ago
FWIW, additionally, the logic could be simplified to:
if context.Token != "" {
// TODO - Double check if this is needed
exportCommandStr = append(exportCommandStr, fmt.Sprintf("export BOUNDARY_TOKEN=%s", context.Token))
}
Instead of using the (temporary) shellCommandToken
variable, which is only ever used in that small section. This pattern is used several times in the various product subcommands, but could be simplified quite a bit, and avoid unnecessary string allocations.
The
selectBoundaryCmd
sets aNOMAD_TOKEN
environment variable:https://github.com/devops-rob/target-cli/blob/7a10f70ca7b6f6da387f82a00136414b66ff0ba4/cmd/select.go#L400-L405