CircleCI-Public / windows-preview-docs

Temporary docs on how to use the pre-release preview of Windows builds on CircleCI
MIT License
9 stars 2 forks source link

powershell always runs with --NoProfile #6

Open mbravorus opened 5 years ago

mbravorus commented 5 years ago

Hi,

powershell gets always invoked with -NoProfile option. This makes persisting PATH and other changes, say, after installing packages with Chocolatey, very difficult (have to repeatedly re-set PATH or run a set-up script for every run, instead of saving everything needed to a script that would get run by the profile mechanism)

Do you think this can be changed, or allowed to be changed in shell spec per job?

appplemac commented 5 years ago

Thanks for reporting this @mbravorus. We‘re working on solving this, I’ll update here as we roll out the changes to improve the experience here.

mbravorus commented 5 years ago

here are some specifics; if you look here - https://chocolatey.org/docs/troubleshooting#i-cant-get-the-powershell-tab-completion-working

that's the piece of Chocolatey setup that is missing (basically, making sure that default profile runs the powershell setup bit that gets installed with choco)

it might not be ALL that is needed for complete happiness, but it is definitely necessary

appplemac commented 5 years ago

Hey @mbravorus, we’ve just merged a fix for this case, could you please try updating the orb version in your config to the following:

version: 2.1

orbs:
  win: circleci/windows-tools@0.0.4

We’re now adding the Chocolatey Profile helpers into the default profile and enabling the default profile from the start. Please let me know if this fixes this issue.