Exemplo n.º 1
0
        private FilePath GetNuGetPath()
        {
            var nugetPath = _toolResolver.ResolvePath();

            if (nugetPath == null)
            {
                throw new CakeException("Failed to find nuget.exe.");
            }
            return(nugetPath);
        }
Exemplo n.º 2
0
        private FilePath GetNuGetPath()
        {
            var nugetPath = _nugetPath ?? (_nugetPath = _nugetToolResolver.ResolvePath());

            if (nugetPath == null)
            {
                throw new CakeException("Failed to find NuGet");
            }
            return(nugetPath);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets alternative file paths which the tool may exist in
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <returns>The default tool path.</returns>
        protected sealed override IEnumerable <FilePath> GetAlternativeToolPaths(TSettings settings)
        {
            var path = _resolver.ResolvePath();

            if (path != null)
            {
                return(new[] { path });
            }

            return(Enumerable.Empty <FilePath>());
        }