Menu
  • HOME
  • TAGS

F# FAKE will not execute powershell script file

powershell,f#,chocolatey,f#-fake

Your powershell script has some issues, and would not work even if run from the command line. In particular, cd .\somedir | iex .\SomeScript.ps1 is nonsensical - you are piping the result of a cd (which is $null, since cd doesn't return anything) to Invoke-Expression, which is basically saying "run...

Add Custom Argument Completer for Cmdlet?

powershell,cmdlet,chocolatey

You may want to look at the TabExpansion++ module, which was designed to make extending tab completion easier. I just played with it for few minutes, and I think you want something like this based on the example: Import-Module TabExpansion++ function PaketAddNugetCompletion { [ArgumentCompleter(Parameter = 'Nuget', Command = 'Paket-Add')] param($commandName,...

How do I override the Ruby and Ruby DevKit installdir with Chocolatey?

ruby,install,chocolatey,ruby-development-kit

Forewarning Parts of Ruby, coming from *nix, do not like spaces. Gems is one of them. This is not a Chocolatey thing, just an FYI in case you DO run into issues once you put it into Program Files. It likely won't work there, so if you run into problems,...

'PowerShell' is not recognized as an internal or external command

powershell,chocolatey

This can happen if a program is not on your PATH. Open a PowerShell prompt and enter [environment]::setEnvironmentVariable('PATH', "$env:path;C:\Windows\System32\WindowsPowerShell\v1.0", 'm') then restart PowerShell....

How do I run PowerShell 4.0 after upgrading from PowerShell 2.0?

powershell,powershell-v2.0,powershell-v4.0,chocolatey

I needed to restart my computer for windows update to install Microsoft Windows Management Framework 4.0 ...

How to bypass Chocolatey install confirmation? [duplicate]

powershell,chocolatey

This is really a duplicate of this question: How do I update all Chocolatey apps without confirmation? Yes, totally possible, use: choco install vagrant -y See also choco install -h for more information....

How to avoid code duplication in nuspec?

chocolatey,nuspec

That's not really code duplication. You have multiple packages where you are doing the same thing, but each package is its own different thing.

How to list installed Chocolatey packages using Ruby?

ruby,chocolatey

Not sure if this is what you are looking for, but you can use capture3 instead of popen3 to capture the output. command = "clist -lo" require 'open3' stdout, stderr, status = Open3.capture3(command) puts "stdout: #{stdout}" puts "stderr: #{stderr}" puts "status: #{status}" results in stdout: 7zip.install 9.22.01.20130618 autohotkey_l 1.1.13.01 autohotkey_l.install...

How do I specify a port in a Chocolatey package install script?

shell,powershell,port,chocolatey

Right now the 0.9.9 series doesn't seem to play well with proxies - follow https://github.com/chocolatey/choco/issues/243 to learn about when and what version it is fixed in. Thanks! You can also stick with 0.9.8.33 until the fixes are in - we even have a way for you to install the older...

How to add additional files to a package using NuGet?

nuget,chocolatey

<files> <file src="..\..\..\common\Uninstall-ChocolateyZipPackage030.ps1" target="tools\Uninstall-ChocolateyZipPackage030.ps1" /> <file src="tools\*" target="tools" /> </files> adds all the files to the nupkg file....

Where do I place my .emacs file on Windows with emacs installed through chocolatey?

windows,emacs,chocolatey

Your .emacs file will be located in your home directory. There's a list of ways Emacs can determine what that directory is. In order, they are: If you've set the environment variable "HOME", it will be there. This is probably the most common way to set it. If you set...

Where is the cygwin setup.exe binary when installed with the Chocolatey package manager?

windows,cygwin,chocolatey

I downloaded the cygwin package and inspected the chocolateyInstall.ps1. Looks like the package downloads the exe installer and passes the target folder. $binRoot = Get-BinRoot $cygRoot = join-path $binRoot "cygwin" $cygPackages = join-path $cygRoot packages # https://cygwin.com/faq/faq.html#faq.setup.cli $silentArgs = "-q -R $cygRoot -l $cygPackages -s http://mirrors.kernel.org/sourceware/cygwin/" $validExitCodes = @(0) Install-ChocolateyPackage...

Is there a way to get Chocolatey to show the progress of a download?

windows,cmd,chocolatey

In the Powershell version of Chocolatey, i.e. version <= 0.9.8.33 there was a progress bar indicating the progress of the download. However, in the current C# version of Chocolatey (at the time of this comment 0.9.9.6) there is no equivalent for this. There is an issue to track this feature,...

How do I install Chocolatey using C#?

c#,chocolatey

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CInstInst { class Program { static void Main(string[] args) { string command = @"@powershell -NoProfile -ExecutionPolicy Bypass -Command ""iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"; ExecuteCommandSync(command); } public static void ExecuteCommandSync(object command) { try { // create the ProcessStartInfo using...

How do I update all Chocolatey apps without confirmation?

chocolatey

tl;dr - Yes, completely possible. Use cup all -y Also check out the help menus now - choco -h, choco install -h Longer answer, we've moved a little closer towards other package managers for security reasons, where by default we stop and confirm if you are okay with the state...

How can I alter a Chocolatey package's $url for install

powershell,proxy,http-proxy,chocolatey

This isn't a complete answer and I'm not sure how safe this answer is (in terms of surviving updates to Chocolatey itself), but it's resolved my immediate issue with the android-sdk package. Unfortunately, any package that implements its own download code bypasses this "fix". I noticed the line in the...

How to silently install Visual Studio Code on Windows?

chocolatey,vscode

Because it uses Squirrel, you can just use -s https://github.com/Squirrel/Squirrel.Windows/blob/92e7af66b1593f951527dd88289a4ed1bee4bcdd/src/Update/Program.cs#L109 Also https://chocolatey.org/packages/VisualStudioCode#files...

Chocolatey, npm and grunt-cli installation problems

windows,node.js,npm,chocolatey,grunt-cli

NPM might be tool old from that package. It's my understanding they are no longer offering a separate NPM away from NodeJS (I could be incorrect here, I'd love to be wrong). I'd prefer using the nodejs.install package (which comes with npm). To answer your question: the location with a...

Avoid code duplication Chocolatey Packages

code-duplication,chocolatey

I have a few suggestions as to how you could proceed with this... (Probably the one that would take the longest due to dependency on other people) If these functions are fully re-usable, by yourself, and other people, then I would suggest submitting a Pull Request into Chocolatey Core, to...

How to test dependencies of Chocolatey packages locally?

chocolatey

Use apostrophe ' and double quotes " on each side, like: In powershell.exe: -source "'"$pwd;https://chocolatey.org/api/v2/"'" In cmd.exe: -source '"%cd%;https://chocolatey.org/api/v2/"' https://github.com/chocolatey/chocolatey/wiki/CommandsInstall#source-optional...

Where is the Chocolatey installation path?

windows,powershell,chocolatey

There is an environment variable set on installation, ChocolateyInstall which is set to C:\Chocolatey by default in versions of Chocolatey less then 0.9.8.27. After that, this defaults to C:\ProgramData\Chocolatey. In version 0.9.9 of Chocolatey, it actively moves from the old folder location to the new one. You can also pre-emptively...

Optional dependencies in chocolatey package

powershell,nuget,chocolatey

What folks usually do is create two packages, one with the core bits and required dependencies and a second meta package that takes a dependency on the tool and the other items (optional dependencies).

Why is chocolatey trying to insll to C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules

powershell,chocolatey

It is possible to look "inside" every Chocolatey package using the Nuget Package Explorer in order to see "what is going on". If you do this for the PowerTab package, you will see the following: $name = 'powertab' $url = 'http://powertab.codeplex.com/downloads/get/159925' $target = Join-Path $PSHOME 'Modules' Install-ChocolateyZipPackage $name $url $target...

How does Chocolatey know which packages are installed locally?

chocolatey

choco list -lo only lists the latest versions of the packages you have installed. Old choco invoked nuget.exe, new choco (0.9.9+) does it directly since it has nuget.core built-in. It does a list against %ChocolateyInstall%\lib when you call list -lo. If several versions of the same package exist, only the...

Boo to the Chocolatey Gods

c#,git,powershell,command-line,chocolatey

So installing Git and Posh-Git hasn't been too pleasant, how I fixed the error was by reinstalling Chocolatey, then doing the following: @Powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin I know it is a tedious command, but I reinstalled with the above then did the following...

Can't run iex in Windows command prompt or git bash

elixir,chocolatey

Neither Erlang nor Elixir are automatically added to your path by Chocolatey. So make sure you add both Erlang's and Elixir's bin directory to your path. Since you mention that you're not really used to Windows, try running this at the command prompt before you try to execute iex.bat: SET...

Should I ever include a reboot command in my BoxStarter script?

powershell,restart,reboot,chocolatey,boxstarter

Personally, I would never do this, no. I rely on Boxstarter looking after this for me, as internally it is doing the same check, so doing it in addition in my script is duplication of effort. There are times when, as you mention, you know that a reboot is required...

What's the difference between Chocolatey's Git packages?

chocolatey

According to this forum thread the .install suffix is a discoverability artefact. Just use the shorter name: choco install git ...