Don't panic if there's no command line arguments

This commit is contained in:
bombless 2015-02-15 23:40:56 +08:00
parent b6d91a2bda
commit 6514c3ab16

View File

@ -50,7 +50,7 @@ fn main() {
let mut term = Term::new();
let cmd = os::args();
if cmd.len() < 1 {
if cmd.len() <= 1 {
help::usage()
} else {
match subcommand::parse_name(&cmd[1][]) {