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 a13f7bb commit 9b7d8baCopy full SHA for 9b7d8ba
src/rez/tests/test_shells.py
@@ -591,6 +591,22 @@ def _make_alias(ex):
591
out, _ = p.communicate()
592
self.assertEqual(0, p.returncode)
593
594
+ @per_available_shell()
595
+ def test_alias_non_existent_command_return_code(self, shell):
596
+ """Ensure return codes are correct while using aliases."""
597
+ config.override("default_shell", shell)
598
+
599
+ def _make_alias(ex):
600
+ ex.alias('my_alias', 'a_non_existent_executable')
601
602
+ r = self._create_context([])
603
+ p = r.execute_shell(command='my_alias',
604
+ actions_callback=_make_alias,
605
+ stdout=subprocess.PIPE)
606
607
+ out, _ = p.communicate()
608
+ self.assertNotEqual(0, p.returncode)
609
610
611
if __name__ == '__main__':
612
unittest.main()
0 commit comments