Exemplo n.º 1
0
        public static void Run(InstallOptions opts)
        {
            if (opts.Version == null)
            {
                opts.Version = Utils.getLocalNPMRCVersion().Version;
            }
            if (opts.Version == null)
            {
                Console.Error.WriteLine("Please specifiy a version to install");
                return;
            }
            NodeVersion toInstall = VersionResolver.Resolve(opts.Version);

            if (toInstall == null)
            {
                Console.Error.WriteLine("Invalid version provided, couldn't resolve version \"" + opts.Version + "\"");
            }
            else
            {
                Download(toInstall);
            }
        }