openframeworks / openframeworks/openFrameworks

setx PATH "c:\msys64\mingw32\bin;c:\msys64\usr\bin;%PATH%"

Open
#6,907 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Do not suggest using it.
https://openframeworks.cc/setup/msys2/
https://github.com/openframeworks/openFrameworks/blob/master/docs/msys2.md

C:\Users\Asus-PC>setx PATH "c:\msys64\mingw32\bin;c:\msys64\usr\bin;%PATH%"

WARNING: The data being saved is truncated to 1024 characters.

SUCCESS: Specified value was saved.

It takes HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment Path and Computer\HKEY_CURRENT_USER\Environment Path together as %PATH%, truncates it to 1024 characters and set it to Computer\HKEY_CURRENT_USER\Environment. In other words it deletes the user paths rewriting it with truncated system ones. https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/setx#remarks

Better rewrite it with commands suggested here:
https://superuser.com/questions/387619/overcoming-the-1024-character-limit-with-setx
https://stackoverflow.com/questions/17240725/setx-doesnt-append-path-to-system-path-variable

Or edit Computer\HKEY_CURRENT_USER\Environment directly.

If one do not close CMD after running setx PATH "c:\msys64\mingw32\bin;c:\msys64\usr\bin;%PATH%" they can get the previous paths by running echo %PATH% or set.

Also edited directly paths update on interacting with Windows's Edit the system environment variables -> Environment Variables -> Edit environment variable hitting OK.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open docs/msys2.md and the linked MSYS2 setup page to find the instruction that suggests running setx PATH. Confirm the warning and linked command references, then update the guidance so it no longer recommends the unsafe command. Done means the setup documentation no longer exposes users to the described PATH truncation.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.