cmd/syncthing: Fix -logfile/-no-restart test on non-Windows.
This commit is contained in:
@@ -320,9 +320,11 @@ func main() {
|
|||||||
os.Setenv("STGUIAPIKEY", options.guiAPIKey)
|
os.Setenv("STGUIAPIKEY", options.guiAPIKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for options which are not compatible with each other
|
// Check for options which are not compatible with each other. We have
|
||||||
// Have to check logfile before it's set to the default below - we only want to complain if they set -logfile explicitly, not if it's set to its default location
|
// to check logfile before it's set to the default below - we only want
|
||||||
if options.noRestart && options.logFile != "" {
|
// to complain if they set -logfile explicitly, not if it's set to its
|
||||||
|
// default location
|
||||||
|
if options.noRestart && (options.logFile != "" && options.logFile != "-") {
|
||||||
l.Fatalln("-logfile may not be used with -no-restart or STNORESTART")
|
l.Fatalln("-logfile may not be used with -no-restart or STNORESTART")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user