We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c5ef7a commit 774963eCopy full SHA for 774963e
src/rez/tests/test_shells.py
@@ -607,6 +607,22 @@ def _make_alias(ex):
607
out, _ = p.communicate()
608
self.assertEqual(1, p.returncode)
609
610
+ @per_available_shell()
611
+ def test_alias_non_existent_command_return_code(self, shell):
612
+ """Ensure return codes are correct while using aliases."""
613
+ config.override("default_shell", shell)
614
+
615
+ def _make_alias(ex):
616
+ ex.alias('my_alias', 'a_non_existent_executable')
617
618
+ r = self._create_context([])
619
+ p = r.execute_shell(command='my_alias',
620
+ actions_callback=_make_alias,
621
+ stdout=subprocess.PIPE)
622
623
+ out, _ = p.communicate()
624
+ self.assertNotEqual(0, p.returncode)
625
626
627
if __name__ == '__main__':
628
unittest.main()
0 commit comments