diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index f8991413cd..4f84104f84 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1503,9 +1503,9 @@ def to_dict(self, all_deps=False): return syaml_dict([('spec', node_list)]) - def to_yaml(self, stream=None): + def to_yaml(self, stream=None, all_deps=False): return syaml.dump( - self.to_dict(), stream=stream, default_flow_style=False) + self.to_dict(all_deps), stream=stream, default_flow_style=False) def to_json(self, stream=None): return sjson.dump(self.to_dict(), stream)