TheAngryByrd / dotnet-mono

dotnet utility to run .net full apps using mono on OSX/Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider using `--` as well as `-po=` to specify program options

TheAngryByrd opened this issue · comments

Since dotnet run uses -- to signify the end of the parameter list and pass the remaining options to the executing binary we should consider doing the same so it's not too tricky for users to map from dotnet run -> dotnet mono.

See my comment at fsprojects/Argu#106 (comment) where I mention that -- is a standard Unix convention for "stop parsing arguments here and pass the rest to the program unmodified", so I like the idea of having dotnet-mono match what dotnet-run does.

I've just implemented a custom version of it, but would be nice if Argu could handle this as it would be able to output a much nicer message. So far this is best I got without really tinkering with Argu internals:

$ dotnet mono --help
Much like dotnet-run you can specify dotnet mono [options] [[--] <additional arguments>...]] to pass arguments to the underlying program.
USAGE: dotnet-mono [--help] [--project <project>] [--framework <framework>] [--runtime <runtime>] [--inferruntime] [--configuration <configuration>] [--restore] [--no-restore]
                   [--frameworkpathoverride=<frameworkPathOverride>] [--monooptions=<monoOptions>] [--programoptions=<programOptions>] [--loggerlevel <logLevel>] [--no-build] [--purge-system-net-http]

OPTIONS:

    --project, -p <project>
                          (Optional) Specify path to proj file.  Will default to current directory.
    --framework, -f <framework>
                          (Mandatory) Specify a framework.  Most likely net462.  List available here: https://docs.microsoft.com/en-us/nuget/schema/target-frameworks
    --runtime, -r <runtime>
                          (Optional) Specify a runtime. List available here: https://github.com/dotnet/docs/blob/master/docs/core/rid-catalog.md.  You will probably either need to run dotnet restore
                          properly with runtime or pass --restore.
    --inferruntime        (Optional) Try to run explicitly on the current runtime. You will probably either need to run dotnet restore properly with runtime or pass --restore.
    --configuration, -c <configuration>
                          (Optional) Specify a configuration. (Debug|Release|Others) Will default to Debug
    --restore             (Optional) Will attempt dotnet restore
    --no-restore          (Optional) Will pass --no-restore to dotnet build.
    --frameworkpathoverride=<frameworkPathOverride>
                          (Optional) Set FrameworkPathOverride as Environment Variable or as argument.  It will try to infer based on known good locations on osx/linux.
    --monooptions, -mo=<monoOptions>
                          (Optional) Flags to be passed to mono.
    --programoptions, -po=<programOptions>
                          (Optional) Flags to be passed to running exe.
    --loggerlevel <logLevel>
                          (Optional) LogLevel for dotnet-mono defaults to Info (Verbose|Debug|Info|Warn|Error|Fatal)
    --no-build            (Optional) Will attempt to skip dotnet build.
    --purge-system-net-http
                          (Optional) Mono has issues with HttpClient noted here: https://github.com/dotnet/corefx/issues/19914 ...This will attempt to resolve them.
    --help                display this list of options.