summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Wiley <brandon@blanu.net>2016-11-22 10:55:16 -0600
committerBrandon Wiley <brandon@blanu.net>2016-11-22 10:55:16 -0600
commite78563fdb372de12a1de9facfc6c8da2529b2b0f (patch)
tree5e0a9e4226e8723e827f9371956e490e9e074a1e
parent120a864113b6b1bcb66cf23d9f4f50ba1203e5ec (diff)
Print usage when require parameters are missing
-rw-r--r--shapeshifter-dispatcher/shapeshifter-dispatcher.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/shapeshifter-dispatcher/shapeshifter-dispatcher.go b/shapeshifter-dispatcher/shapeshifter-dispatcher.go
index 0addd8a..731f729 100644
--- a/shapeshifter-dispatcher/shapeshifter-dispatcher.go
+++ b/shapeshifter-dispatcher/shapeshifter-dispatcher.go
@@ -131,9 +131,11 @@ func main() {
launched := false
isClient, err := checkIsClient(*clientMode, *serverMode)
if err != nil {
+ flag.Usage()
golog.Fatalf("[ERROR]: %s - either --client or --server is required, or configure using PT 2.0 environment variables", execName)
}
if stateDir, err = makeStateDir(*statePath); err != nil {
+ flag.Usage()
golog.Fatalf("[ERROR]: %s - No state directory: Use --state or TOR_PT_STATE_LOCATION environment variable", execName)
}
if err = log.Init(*enableLogging, path.Join(stateDir, dispatcherLogFile), *unsafeLogging); err != nil {