vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

[vcpkg/scripts] Teach vcpkg_add_to_path to only add the path if it is not already there

Open Neumann-A opened this issue 1 year ago • 2 comments

vcpkg_add_to_path should only add a path to PATH if it is not already present on PATH. Furthermore there should be some special treatment of the PREPEND/APPEND in the case if the path is already in PATH.

Neumann-A avatar Apr 21 '24 07:04 Neumann-A

Related: https://github.com/microsoft/vcpkg/pull/30396. vcpkg_host_path_list(REMOVE_DUPLICATES listvar) would remove duplicate regardless of whether they were created by vcpkg_add_to_path or by user script code.

dg0yt avatar Apr 21 '24 07:04 dg0yt

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] avatar Oct 20 '24 02:10 github-actions[bot]

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] avatar May 06 '25 02:05 github-actions[bot]