Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSCore-Preview.3 - Fix Ubuntu 18.04 missing PWSH path when calling PowerShell. #7062

Closed
MaximoTrinidad opened this issue Jun 13, 2018 · 5 comments
Labels
Area-Maintainers-Build specific to affecting the build Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-Answered The question is answered.

Comments

@MaximoTrinidad
Copy link

Steps to reproduce

After installing deb package, type 'pwsh'.

maxt@ubuntu:~$ pwsh

Command 'pwsh' not found, did you mean:

  command 'wsh' from deb wcc
  command 'ppsh' from deb ppsh
  command 'posh' from deb posh
  command 'pdsh' from deb pdsh

Try: sudo apt install <deb name>

maxt@ubuntu:~$

Expected behavior

type: pwsh, then will open PowerShell Core.


Actual behavior

pwsh can't be found to execute


Workaround

Type the full path:

/opt/microsoft/powershell/6-preview/pwsh

Environment data
----------------

<!-- provide the output of $PSVersionTable -->

```powershell
PS /home/maxt> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.3
PSEdition                      Core
GitCommitId                    v6.1.0-preview.3
OS                             Linux 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


PS /home/maxt> cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
PS /home/maxt> 

ubun1804_pwsh_2018-06-13_19-38-02

@markekraus
Copy link
Contributor

Hi @MaximoTrinidad ! Did you try what was listed in the release notes?

Note: In order to be able to deliver the PowerShell Core preview release and not deliver it to users expecting the stable release, we have renamed the preview package to powershell-preview and allowed it to be installed side by side with the stable package. This resulted in the symbolic link which exposes PowerShell to the Unix systems to be renamed. It was renamed to pwsh-preview for both macOS and Linux. We are considering something similar for Windows.

@markekraus
Copy link
Contributor

markekraus commented Jun 13, 2018

mark@posh-ubuntu:~$ sudo dpkg -i powershell-preview_6.1.0-preview.3-1.ubuntu.16.04_amd64.deb
[sudo] password for mark:
Selecting previously unselected package powershell-preview.
(Reading database ... 257002 files and directories currently installed.)
Preparing to unpack powershell-preview_6.1.0-preview.3-1.ubuntu.16.04_amd64.deb ...
Unpacking powershell-preview (6.1.0~preview.3-1.ubuntu.16.04) ...
Setting up powershell-preview (6.1.0~preview.3-1.ubuntu.16.04) ...
Processing triggers for man-db (2.7.5-1) ...
mark@posh-ubuntu:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
mark@posh-ubuntu:~$ pwsh-preview
PowerShell v6.1.0-preview.3
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS /home/mark> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.3
PSEdition                      Core
GitCommitId                    v6.1.0-preview.3
OS                             Linux 4.4.0-128-generic #154-Ubuntu SMP Fri May 25 14:15:18 UTC 2018
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

@MaximoTrinidad
Copy link
Author

@markekraus

Not really! I went straight to the instruction docs and then did the deb package installation.

I will check the release notes! Hehe
:)

@markekraus
Copy link
Contributor

markekraus commented Jun 13, 2018

@MaximoTrinidad The instruction docs are for GA release versions. Preview and RC's live and die by the release notes. 😃

@MaximoTrinidad
Copy link
Author

MaximoTrinidad commented Jun 13, 2018

Ah! Got it now!

Well, a little bit of pain won't hurt. I'm guessing that's why the deb package is available. But, I'm surprise the path to pwsh is not set.

Thanks for clarifying!
:)

@iSazonov iSazonov added Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Area-Maintainers-Build specific to affecting the build Resolution-Answered The question is answered. labels Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Maintainers-Build specific to affecting the build Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-Answered The question is answered.
Projects
None yet
Development

No branches or pull requests

3 participants