Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! Use posixPath to make safe paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nre-ableton committed Sep 25, 2023
1 parent e664a81 commit 5d4b875
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/com/ableton/Pyenv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@ class Pyenv implements Serializable {
int result
script.withEnv(["PYENV_VERSION=${pythonVersion}"]) {
List installCommands = []
String safePyenvRoot = VirtualEnv.posixPath(pyenvRoot)
installCommands.add("export PYENV_ROOT=${safePyenvRoot}")
installCommands.add("export PATH=${safePyenvRoot}/bin:\$PATH")
installCommands.add("export PYENV_ROOT=${pyenvRoot}")
installCommands.add("export PATH=${pyenvRoot}/bin:\$PATH")
if (script.isUnix()) {
installCommands += [
"eval \"\$(pyenv init --path)\"",
"eval \"\$(pyenv init -)\"",
]
} else {
installCommands.add("export PATH=${safePyenvRoot}/shims:\$PATH")
installCommands.add("export PATH=${pyenvRoot}/shims:\$PATH")
}
installCommands += [
"pyenv install --skip-existing ${pythonVersion}",
Expand Down

0 comments on commit 5d4b875

Please sign in to comment.