Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failure during substitution with custom user prompt #409

Open
hughlunnon opened this issue Mar 26, 2024 · 0 comments
Open

failure during substitution with custom user prompt #409

hughlunnon opened this issue Mar 26, 2024 · 0 comments

Comments

@hughlunnon
Copy link

hughlunnon commented Mar 26, 2024

we've an application that builds completely correctly on most people's laptops and on our build environment, however in my local environment I get the following issue :

Unresolved substitution ${COLOR_USR}%n@%M ${COLOR_DIR}%d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}%% at (env) MultipleFailures(failures=com.sksamuel.hoplite.fp.NonEmptyList@57087e4f) java.lang.RuntimeException: Unresolved substitution ${COLOR_USR}%n@%M ${COLOR_DIR}%d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}%% at (env) MultipleFailures(failures=com.sksamuel.hoplite.fp.NonEmptyList@57087e4f)

I've done a bit of hunting and it seems this is because a variable being picked up by hoplite (called "PROMPT") which is the setup of my command prompt (which has a few nice tweaks to show the current git branch in colour, as per https://stackoverflow.com/questions/17333531/how-can-i-display-the-current-branch-and-folder-path-in-terminal)

specifically the value of PROMPT is

${COLOR_USR}%n@%M ${COLOR_DIR}%d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}%% 

I guess this is borking somewhere in an attempt to parse some environment variables (as its full of % and $ symbols) - is there a way to either

  • exclude this env variable specifically (probably undesirable)
  • allow for failed parseing of env variables to be skipped instead of floating them to the top (there may already be a way of doing this I'm unaware of)
  • something else?

happy to help with debugging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant