Skip to content

Install scripts will violate system environment variable PATH in VS Developer Prompt/PowerShell #654

Description

@TaiXeflar

To Reproduce

  1. Open a Visual Studio Developer Prompt (or based profiles). The prompt profiles can be:

    • Developer Prompt for Visual Studio 20XX
    • Developer PowerShell for Visual Studio 20XX
    • Intel oneAPI Command Prompt for Intel 64 for Visual Studio 20XX
  2. Download the Windows specific release zip, unzip it anywhere and run the install script.

    PS C:\Users\TaiXeflar\Desktop\modules-5.6.1-win> ./INSTALL.bat
    
    

What it happens after

In the current session nothing happens as you can enjoy your coding coffee.

But the chaos begins with you want to start a new terminal session (If you want open a new Windows Terminal, or other powershell.exe, cmd.exe, or restart your machine). You will not find some useful tools that you've instelled before, and the worse cases you even can't open cmd.exe, powershell.exe, regedit.exe etc.

Debugging information

If PATH is long enough, the INSTALL.bat runs will print a warning message shows characters reach 1024 chars limit and cut it.

This is quite possiably happens when system's PATH at lower priority (espically VS developer prompt), it will erase these PATHs out of system default required paths. When you cannot call cmd/powershell/regedit/sysdm.cpl then you will realize that your system is f**ked.

This happens on my Environment Modules first try, 3 years ago.

Modules version and configuration

Any Modules version provided Install script, with any version of Visual Studio provided Developer Prompt/PowerShell.

Additional context

This should add into docs to warn users. If they want to install modules, better be in a terminal with simple environment.

Because I have my experience and had to re-install Windows to repair those PATH.

@xdelaruelle sry for tagging , but if there's similar issues, please close this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions