pitermarx / Cake.Console

A Cake Console app without Frosting
MIT License
8 stars 2 forks source link

Smarter Cmdline parsing #3

Open pitermarx opened 3 years ago

pitermarx commented 3 years ago

Currently is very naive

args.Select(a => a.Replace("-", string.Empty).Split("="))
       .ToDictionary(
          pair => pair[0],
          pair => pair.Length > 1 ? pair[1] : "true");
pitermarx commented 3 years ago

Cake.Console has 2 modes

  1. RunCakeCli
  2. BuildHost

on 1. the parsing is done via spectre console, but on 2. it's still a naive string split