Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/App/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,26 @@ let main argv =
{ LogDebugPartitions = List.ofSeq mission.LogDebugPartitions
LogTracePartitions = List.ofSeq mission.LogTracePartitions }

let looksLikeFlagValue (s: string) =
match s.ToLowerInvariant() with
| "true" | "false" -> true
| _ ->
let (isNumeric, _) = System.Double.TryParse(s)
isNumeric

match Seq.tryFind (allMissions.ContainsKey >> not) mission.Missions with
| Some e ->
(LogError "Unknown mission: %s" e

if looksLikeFlagValue e then
LogError
"Note: '%s' looks like a value for a command-line flag rather than a mission name. You may have passed an argument to a flag that doesn't accept one (e.g. --catchup-skip-known-results-for-testing=false instead of --catchup-skip-known-results-for-testing)."
e
elif e.StartsWith("-") then
LogError
"Note: '%s' looks like a command-line option rather than a mission name. You may have a typo in the option name, or used an option not supported by the 'mission' verb."
e

LogError "Available missions:"
Map.iter (fun k _ -> LogError " %s" k) allMissions
1)
Expand Down
Loading