Skip to content

Commit 64e4f67

Browse files
authored
Add error for missing username on :logout (#277)
1 parent a18d0f5 commit 64e4f67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/commands.rs

+3
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,9 @@ fn iamb_open(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
515515
fn iamb_logout(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
516516
let args = desc.arg.strings()?;
517517

518+
if args.is_empty() {
519+
return Result::Err(CommandError::Error("Missing username".to_string()));
520+
}
518521
if args.len() != 1 {
519522
return Result::Err(CommandError::InvalidArgument);
520523
}

0 commit comments

Comments
 (0)