Skip to content

Conversation

@de-ep
Copy link
Contributor

@de-ep de-ep commented Dec 10, 2025

tilde expansion before attempting a git clone, Fixes #186

Copy link
Contributor

@mrexodia mrexodia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor change required for Windows

cmake/cmkr.cmake Outdated
set(CMKR_DIRECTORY_PREFIX "$ENV{CMKR_CACHE}")
string(REPLACE "\\" "/" CMKR_DIRECTORY_PREFIX "${CMKR_DIRECTORY_PREFIX}")
if(CMKR_DIRECTORY_PREFIX MATCHES "^~")
string(REGEX REPLACE "^~" "$ENV{HOME}" CMKR_DIRECTORY_PREFIX "${CMKR_DIRECTORY_PREFIX}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works on unix systems, windows requires $ENV{USERPROFILE}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but tilde is specific to unix systems? And in windows, if a user sets %USERPROFILE% in an environment variable it is automatically expanded

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the ~ is unix-specific, but people using git bash might enter something like this and adding support for it isn't difficult.

@de-ep de-ep requested a review from mrexodia December 21, 2025 09:33
@mrexodia mrexodia merged commit 645737a into build-cpp:main Dec 21, 2025
5 checks passed
@mrexodia
Copy link
Contributor

Awesome, thanks!

@de-ep de-ep deleted the fix-tilde-expansion branch December 21, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

export CMKR_CACHE=~/.cache/cmkr causes weird errors

2 participants