Geeksltd / Olive

Olive framework, for more productive cross platform .NET solutions. It's available under the GPL v3 license. See License.md for more information.
https://geeksltd.github.io/Olive
Other
44 stars 44 forks source link

Do not set system32 as working directory #234

Closed Hatef-Rostamkhani closed 5 years ago

Hatef-Rostamkhani commented 5 years ago

https://github.com/Geeksltd/Olive/blob/459051e49a32bdf0af370ae57a7275cd1873e752/Olive/-Extensions/FileInfo.cs#L89

based this code, when you want to found nuget by where.exe you set working directory as c:\windows\system32 and nuget not found so I have an error to find nuget.exe, if you set empty nuget.exe was found

OliveSolution.cs method RestoreNuget() called i have a error when called WindowsCommand.FindExe("nuget")

you can change it or change the method parameters and set the working directory

WorkingDirectory = @this.Directory.FullName.ToLower().Contains("system32") ? string.Empty : @this.Directory.FullName,

iPazooki commented 5 years ago

@Hatef-Rostamkhani Thanks for your solution, if you don't mind, please create a Pull Request that contains your suggested changes and then @PaymonK will decide about it.

Hatef-Rostamkhani commented 5 years ago

Thanks, I sent a pull request