Skip to content

Commit

Permalink
feat(cli): Add LTL version in the versions command
Browse files Browse the repository at this point in the history
  • Loading branch information
symbiont-daniel-gustafsson committed Mar 26, 2021
1 parent 3eb9909 commit 5c202d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/cli/cmd/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ import (
)

func printVersion(cmd string) {
cmdVersion := exec.Command(cmd, "--version")
arg := "--version"

if cmd == "detsys-ltl" {
arg = "version"
}

cmdVersion := exec.Command(cmd, arg)
out, err := cmdVersion.CombinedOutput()

if err != nil {
Expand All @@ -36,6 +42,7 @@ var versionsCmd = &cobra.Command{
"detsys-debug",
"detsys-generator",
"detsys-ldfi",
"detsys-ltl",
"detsys-scheduler",
}
for _, cmd := range cmds {
Expand Down

0 comments on commit 5c202d3

Please sign in to comment.