Skip to content

Commit 4a21b7a

Browse files
committed
Use shell startup setting to enable warnings or errors
Signed-off-by: javrin <[email protected]>
1 parent 5d4809d commit 4a21b7a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/rez/rezconfig.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@
709709
# If true, print warnings associated with shell startup sequence, when using
710710
# tools such as rez-env. For example, if the target shell type is "sh", and
711711
# the "rcfile" param is used, you would get a warning, because the sh shell
712-
# does not support rcfile.
712+
# does not support rcfile. Also recieve warnings or errors if incompatible shell
713+
# settings are used.
713714
warn_shell_startup = False
714715

715716
# If true, print a warning when an untimestamped package is found.

src/rezplugins/shell/gitbash.py

+4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ def get_syspaths(cls):
109109
return cls.syspaths
110110

111111
def validate_env_sep_map(self):
112+
# Return early if validation is disabled.
113+
if not config.warn("shell_startup"):
114+
return
115+
112116
env_var_seps = self.env_sep_map
113117
shell = self.name()
114118
shell_setting = self.shell_env_sep_map_setting

0 commit comments

Comments
 (0)