Skip to content

Commit

Permalink
hotfix/RSDK-3358-carto-doesnt-boot-in-debug-mode (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksanford authored May 30, 2023
1 parent 93f5c18 commit 6caf34a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions module/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main

import (
"context"
"fmt"
"strings"

"github.com/edaniels/golog"
Expand All @@ -26,9 +25,6 @@ func main() {

func mainWithArgs(ctx context.Context, args []string, logger golog.Logger) error {
var versionFields []interface{}
if len(args) != 2 {
return fmt.Errorf("usage: %s [socket path] start module\nor: %s --version print version & exit", args[0], args[0])
}
if Version != "" {
versionFields = append(versionFields, "version", Version)
}
Expand All @@ -41,7 +37,7 @@ func mainWithArgs(ctx context.Context, args []string, logger golog.Logger) error
logger.Info(viamcartographer.Model.String() + " built from source; version unknown")
}

if strings.HasSuffix(args[1], "-version") {
if len(args) == 2 && strings.HasSuffix(args[1], "-version") {
return nil
}

Expand Down

0 comments on commit 6caf34a

Please sign in to comment.