rez: shebang and executable paths incorrect in gitbash

When creating a rez environment with gitbash on Windows, the shebang and executable paths use a single slash which gets escaped and causes the paths to be incorrect.

Environment

  • OS “windows 10”
  • Rez version “2.109.0”
  • Rez python version “3.7”

To Reproduce

  1. Open a gitbash shell on Windows
  2. Run a rez-env

Expected behavior Taken into a rez environment.

Actual behavior Command not found error

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 24 (15 by maintainers)

Most upvoted comments

Hey @bfloch , thanks for remembering us of that issue! I’ll have to carve some time out to read it carefully (with https://github.com/AcademySoftwareFoundation/rez/pull/739 too).

Centrally because having the logic of how to add to environment variables in individual packages is a maintenance nightmare and should not differ for a single variable/environment anyway. I liked this approach better than extending the append and prepend functionality.

Extending append or prepend or adding new functions would allow to make packages portable. It would allow to mark a string as a “shell” string, which would basically instruct the shell plugins to convert them as it sees fit. It’s good to note that the packages wouldn’t be aware of shell implementations. They would only mark a variable as “need to be converted properly”.