You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing pscore 6.1.0-preview1 I expected to be able to switch between 6.0 and 6.1 via clicking on the version in the status bar, but it seems the directory /usr/local/microsoft/powershell/ is being ignored. I have the following versions installed:
ls -l
drwxr-xr-x 226 root wheel 7232 Jan 9 20:40 6.0.0
drwxr-xr-x 230 root wheel 7360 Sep 13 2017 6.0.0-beta.7
drwxr-xr-x 226 root wheel 7232 Oct 24 23:38 6.0.0-beta.9
drwxr-xr-x 226 root wheel 7232 Nov 18 02:31 6.0.0-rc
drwxr-xr-x 226 root wheel 7232 Dec 13 01:24 6.0.0-rc.2
drwxr-xr-x 227 root wheel 7264 Mar 13 21:49 6.0.2
drwxr-xr-x 227 root wheel 7264 Mar 22 19:55 6.1.0-preview.1
If I use any of these versions directly, I will get the option to "Switch to PowerShellCore" which will then point to /usr/local/bin/pwsh directly.
System Details
Operating system name and version: macOS 10.13.4
VS Code version: 1.12.1
PowerShell extension version: 1.6.0
Output from $PSVersionTable:
PSVersion 6.1.0-preview.1
PSEdition Core
GitCommitId v6.1.0-preview.1
OS Darwin 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64
Platform Unix
On my Windows machine, switching between versions works flawlessly.
The text was updated successfully, but these errors were encountered:
Thanks for this! We've been having some discussions recently about this experience.
Right now, "PowerShell Core" just uses wherever is symlnked to /usr/local/bin/pwsh but it would be nice to be able to discover all the side-by-side versions and select from all of them.
I looked into platform.ts and basically you'd have to expand the currently windows-only section on line 143-162 with the paths for linux or macOS respectively:
if (platformDetails.operatingSystem === OperatingSystem.Windows) {
const psCoreInstallPath =
(!platformDetails.isProcess64Bit ? process.env.ProgramW6432 : process.env.ProgramFiles) + "\\PowerShell";
# rest of the Windows specific block
} else {
const psCoreInstallPath = "/usr/local/microsoft/powershell";
}
if (fs.existsSync(psCoreInstallPath)) {
# ...
}
I'm just assuming here that Linux uses the same path (haven't checked).
PowerShell changed the file path scheme to only have a /6/ and a /6-preview/ this means that these side by side versions cannot be picked up because they are unguessable --closing as a result since we do pick up both pwsh and pwsh-preview
After installing pscore 6.1.0-preview1 I expected to be able to switch between 6.0 and 6.1 via clicking on the version in the status bar, but it seems the directory /usr/local/microsoft/powershell/ is being ignored. I have the following versions installed:
If I use any of these versions directly, I will get the option to "Switch to PowerShellCore" which will then point to /usr/local/bin/pwsh directly.
System Details
$PSVersionTable
:On my Windows machine, switching between versions works flawlessly.
The text was updated successfully, but these errors were encountered: