Skip to content

Commit d959304

Browse files
committed
^fixes__
1 parent 4b8b265 commit d959304

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub mod parse {
1414
use std::env;
1515

1616
pub fn process_name() -> String {
17-
return env::args().collect();
17+
return env::args().collect()[0];
1818
}
1919

2020
pub fn subcommands() -> Vec<String>{
@@ -33,6 +33,10 @@ pub mod parse {
3333
let args: Vec<String> = env::args().collect();
3434
let mut c_index: usize = 0;
3535
for i in &args {
36+
if c_index == 0 {
37+
c_index = 1;
38+
continue;
39+
}
3640
if i.starts_with("--"){
3741
if args[c_index].starts_with("--"){
3842
switches.push(i.to_owned());

0 commit comments

Comments
 (0)