Ejemplo n.º 1
0
        /// <inheritdoc />
        protected override ProcessArgumentBuilder GetArguments(MinVerSettings settings)
        {
            var command = new ProcessArgumentBuilder();
            var args    = CreateArgumentBuilder(settings);

            if (!args.IsNullOrEmpty())
            {
                args.CopyTo(command);
            }

            CakeLog.Verbose("{0} arguments: [{1}]", GetToolName(), args.RenderSafe());

            return(command);
        }
Ejemplo n.º 2
0
        public string View(NpmViewSettings settings)
        {
            IEnumerable <string> output = new List <string>();

            try
            {
                RunCore(settings, new ProcessSettings(), process =>
                {
                    output = process.GetStandardOutput();
                });
                return(string.Join("\n", output));
            }
            catch (CakeException ex)
            {
                CakeLog.Information("Error while calling npm view: " + ex.Message);
                return("");
            }
        }
Ejemplo n.º 3
0
 public string GetNpmVersion()
 {
     try
     {
         string output = null;
         RunCore(new NpmGetNpmVersion()
         {
         }, new ProcessSettings(), process =>
         {
             output = process.GetStandardOutput().Single();
         });
         return(output);
     }
     catch (CakeException ex)
     {
         CakeLog.Information("Error while calling npm -v: " + ex.Message);
         return("");
     }
 }