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

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.

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