public static void Run(ListOptions opts) { List <NodeVersion> versions; if (opts.Remote) { versions = NodeReq.GetVersions(); } else { versions = GetLocalVersions(); } Console.WriteLine("Available Node Versions"); Console.WriteLine(""); foreach (NodeVersion v in versions) { if (!opts.Remote || opts.All || v.GetSemVer().Major != 0) { Console.WriteLine(v.Version); } } }
public static NodeVersion Resolve(string input) { return(Resolve(NodeReq.GetVersions(), input)); }