Skip to content

Commit a897998

Browse files
committed
Fix
1 parent 591ce38 commit a897998

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/core/builtins/caller.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,11 @@ pub fn caller(core: &mut ShellCore, _: &[String]) -> i32 {
1010
}
1111
let functions_len = core.db.index_based_len("FUNCNAME");
1212

13-
//dbg!("{:?}", &core.db.get_vec_from("FUNCNAME", 0, false));
14-
//dbg!("{:?}", &core.db.get_vec_from("BASH_LINENO", 0, false));
1513
let lineno = core.db.get_elem("BASH_LINENO", "0").unwrap();
1614
let mut funcname = core.db.get_elem("FUNCNAME", "1").unwrap();
1715

1816
if funcname == "" {
19-
if core.db.flags.contains('i') || linenos_len == functions_len {
20-
funcname = "NULL".to_string();
21-
}else{
22-
funcname = "main".to_string();
23-
}
17+
funcname = "NULL".to_string();
2418
}else {
2519
funcname = "main".to_string();
2620
}

0 commit comments

Comments
 (0)