asdf-vm/asdf

Add support for powershell core

johnjelinek opened this issue · 4 comments

Steps to reproduce

I'm running PowerShell (Core) 7.0.0-preview.4 on . If I add the following to my $profile, it fails to load:

. /usr/local/opt/asdf/asdf.sh
. /usr/local/opt/asdf/etc/bash_completion.d/asdf.bash

Ideally, there'd be a asdf.ps1 I could source. In the meantime, I'm having to jump into zsh or bash to run asdf and then refer to the installed versions of go/ruby/etc via ~/.asdf/shims/go ....

Expected behavior

Success

Actual behavior

Broken Pipe

Environment

OS: macOS 10.14.6

asdf version: v0.7.4

In the meantime, I added this to my profile and it's working:

$ASDF_BIN = "/usr/local/opt/asdf/bin"
$ASDF_USER_SHIMS = "${env:HOME}/.asdf/shims"
$env:PATH = "${ASDF_BIN}:${ASDF_USER_SHIMS}:${env:PATH}"

Does that mean it's time to update the advertised supported shells, and the install steps, to include PowerShell :)

https://asdf-vm.com/#/

https://asdf-vm.com/#/core-manage-asdf?id=install

Before we advertise it I think we should resolve/perform both:

  • #465
  • create a CI environment for Powershell and see what errors arise

For people on Windows reading this, support for PowerShell Core is not the same as supporting Windows or PowerShell.

PowerShell isn't cross-platform, and asdf doesn't support Windows as @jthegedus mentioned.

The linked PR #1522 (which should be merged when it's ready) strictly supports PowerShell Core on Linux.