Open tintoy opened 5 years ago
Ugh - this is ugly; the old-style credential commands took a list of arguments but the new client-go credential plugins (i.e. "exec") take a simple string containing all arguments (presumably in platform-specific format).
This means we need to support BOTH a list of arguments AND a simple string containing all arguments (and propagate this all the way through to System.Diagnostics.Process
) because platform-specific quoting and escaping of command arguments is a bit of a nightmare).
Here's an idea: Could you deserialize the property directly into a System.Diagnostics.ProcessStartInfo
? It has both ArgumentList
and Arguments
(string), which you could set respectively. From there it would be easy to directly spawn the process by passing the ProcessStartInfo.
Docs here.
See felixfbecker/PSKubectl#54 for further details.