Skip to content

Commit

Permalink
Merge pull request #3762 from TrueBlocks/develop
Browse files Browse the repository at this point in the history
Allows --version without an RPC endpoint
  • Loading branch information
tjayrush authored Jun 6, 2024
2 parents e20d394 + d6043d3 commit aac2901
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/apps/chifra/pkg/utils/is_permitted.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package utils
import "os"

func IsPermitted() bool {
isVersion := false
isStatus := false
isConfig := false
hasPaths := false
Expand All @@ -17,6 +18,8 @@ func IsPermitted() bool {
isConfig = true
} else if arg == "--paths" {
hasPaths = true
} else if arg == "--version" || arg == "version" {
isVersion = true
} else if arg == "edit" {
hasEdit = true
} else if arg != "--verbose" {
Expand All @@ -27,6 +30,10 @@ func IsPermitted() bool {
}
}

if isVersion {
return true
}

if isStatus && cnt == 2 {
return true
}
Expand Down

0 comments on commit aac2901

Please sign in to comment.