Skip to content

mac $env:path is empty in powershell #2937

Closed

Description

@minoseah629

Steps to reproduce

  1. open terminal
  2. input "powershell" in terminal
  3. input "$env:path"
  4. exited powershell
  5. input echo $PATH

Expected behavior

The behavior I expected to see was a string of environmental folders.

From echo $path
/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Application Support/GoodSync:/usr/local/lib/dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-update1/bin:/Users/{username}/.dnx/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/usr/local/share/dotnet:/usr/local/git/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands

Actual behavior

The actual behavior provide no information.
PS /Users/> $env:path
PS /Users/>

Environment data

Name Value


PSVersion 6.0.0-alpha
PSEdition Core
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 3.0.0.0
GitCommitId v6.0.0-alpha.14
CLRVersion
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Activity

  1. minoseah629 commented on Dec 29, 2016

    @minoseah629
    Author

    I just tried using $env:PATH and that provided the correct result.

    I do not think the case should matter in this situation considering that other scripts will potentially use $env:path

  2. vors commented on Dec 29, 2016

    @vors
    Collaborator

    On Mac and Linux env variables are case-sensetive.
    PowerShell should not try to wrap them in case-insensitive manner for the same reasons it should not try to wrap the filesystem.

  3. added
    Resolution-By Design
    on Dec 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-By Design

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions