aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/tomodeps.tm9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/tomodeps.tm b/examples/tomodeps.tm
index e7066a5a..34216806 100644
--- a/examples/tomodeps.tm
+++ b/examples/tomodeps.tm
@@ -126,7 +126,14 @@ func draw_tree(file:Text, dependencies:{Text:{Text}}):
_draw_tree(child, dependencies, already_printed=&printed, is_last=is_child_last)
func main(files:[Text]):
- for f,file in files:
+ if files.length == 0:
+ say("
+ Please provide at least one file!
+ $_USAGE
+ ")
+ return
+
+ for file in files:
if not file:matches($/{..}.tm/):
say("$\x1b[2mSkipping $file$\x1b[m")
skip