6 ms·
I understand your specific security concerns, but the whole line is offensive. Certainly not the fault of the Chocolatey authors, but this is what I'd call a ma
by latch 15y ago
I understand your specific security concerns, but the whole line is offensive. Certainly not the fault of the Chocolatey authors, but this is what I'd call a massively over-engineered shell:
iex ((new-object net.webclient).DownloadString("http://bit.ly/psChocInstall"))
- mattgreenrocks 15y agoGood thing we have bash: a paragon of both simplicity and readability!
- norswap 15y agoNot sure if sarcasm or zealotry.
- contextfree 15y agoExcept for the "iex" this isn't really Powershell specific - it's just instantiating a .NET framework object and calling a method on it. It might as well be C#.
- lucisferre 15y agoNo it might as well not be. One of the big complaints about powershell is how unclear the command line syntax for tools tends to be. A big part of developing a good C# API (or any for that matter) is clarity, readability and understanding. One of the reason fluent APIs are popular. Bad is bad, don't blame .NET or C# for that. And yeah I realize you can come up with an ugly command line example in just about anything. But powershell tends to be one of the uglier ones out there.
- ferventcoder 15y agoWe started with a much more involved set of steps to install and people kept wanting a one liner for the install. It's a tradeoff
- contextfree 15y agoHuh? It's calling DownloadString on a System.Net.WebClient. That IS a C# API. I'm not sure what you're talking about.
- kprobst 15y agoThat being different from using wget or curl in bash or easy_install how again?
- latch 15y agowget http://bit.ly/psChocInstall vs ((new-object net.webclient).DownloadString("http://bit.ly/psChocInstall"))
- doty 15y agoIf you happen to have wget, sure. Windows doesn't, by default. It is far more likely that the machine will have powershell, and if it does, it has the .net frameworks. But, with wget, the line is iex (wget -qO- http://bit.ly/psChocInstall) which isn't too bad.
- ferventcoder 15y agoThat is just a way to install chocolatey. After you install, running installs is 'cinst somepackagename'