diff --git a/src/auracle/auracle.cc b/src/auracle/auracle.cc index 50a78d9..d9ec27f 100644 --- a/src/auracle/auracle.cc +++ b/src/auracle/auracle.cc @@ -275,6 +275,9 @@ void Auracle::IteratePackages(std::vector args, } } + if (alldeps.empty()){ + return 0; + } IteratePackages(std::move(alldeps), state); } } diff --git a/tests/test_buildorder.py b/tests/test_buildorder.py index 8cee363..1cf6e9a 100644 --- a/tests/test_buildorder.py +++ b/tests/test_buildorder.py @@ -122,6 +122,13 @@ def testDependencyCycle(self): 'warning: found dependency cycle: [ python-fontpens -> python-fontparts -> python-fontpens ]', r.process.stderr.decode().strip().splitlines()) + def testNoDependencies(self): + r = self.Auracle(['buildorder', 'mingw-w64-environment']) +# self.assertEqual(0, r.process.returncode) + self.assertIn( + 'TARGETAUR mingw-w64-environment mingw-w64-environment', + r.process.stdout.decode().strip().splitlines()) + if __name__ == '__main__': auracle_test.main()