summaryrefslogtreecommitdiff
path: root/chain/src/item
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2023-07-13 16:47:09 +0800
committerJSDurand <mmemmew@gmail.com>2023-07-13 16:47:09 +0800
commit1d32e421927346d973487c01208ec955f8c68334 (patch)
tree48dbe88d5b911bf09811edb70d35b01b2a46803e /chain/src/item
parent7d10cfabfea934d59d00b86c715147d42ff39369 (diff)
genins: stop printing files if the directory does not exist
Diffstat (limited to 'chain/src/item')
-rw-r--r--chain/src/item/genins.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/chain/src/item/genins.rs b/chain/src/item/genins.rs
index e409c3c..ce34df9 100644
--- a/chain/src/item/genins.rs
+++ b/chain/src/item/genins.rs
@@ -211,7 +211,11 @@ impl DefaultForest<ForestLabel<GrammarLabel>> {
// Whether or not to print detailed graphs of each step of
// operation for debugging purposes.
- let to_print = true;
+ let mut to_print = true;
+
+ if std::fs::metadata(format!("output/")).is_err() {
+ to_print = false;
+ }
let tnt_string = {
let empty_p = atom_child_iter.len() == 0;