AcademySoftwareFoundation / rez

An integrated package configuration, build and deployment system for software
https://rez.readthedocs.io
Apache License 2.0
939 stars 332 forks source link

Running command after "rez-env" produces different result same command being run via "rez-env --" #1567

Open Anti-Distinctlyminty opened 10 months ago

Anti-Distinctlyminty commented 10 months ago

There is a difference in behaviour between starting an environment with rez-env then issuing a command, and using rez-env -- to run the same command.

Environment

To Reproduce

  1. Unpack the attached zip file and install each package, named p and q. Package p will set an alias, and q will remove that same alias.
  2. Run rez-env p then run p, which will run the p_exe,cmd in package p.
  3. Run rez-env p q then once in the environment run p. You should receive 'p' is not recognized as an internal or external command, operable program or batch file.. This is working correctly as package q has unset the macro.
  4. Run rez-env p q -- p

Expected behavior We should get the same output, as the macro should have been unset.

Actual behavior The macro (alias) is still set. So p_exe.cmd is run.

packages.zip

JeanChristopheMorinPerso commented 10 months ago

Hello@Anti-Distinctlyminty , what shell are you using? Also, have you tried on Linux too?

Anti-Distinctlyminty commented 10 months ago

I tested in PowerShell 7.3.9 and Command Prompt (both via Windows Terminal). We're not set up with Linux here right now so haven't tested it there.