Skip to content

Commit

Permalink
Change the order for bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuichiueda committed Jan 23, 2024
1 parent 9e0789a commit 4270046
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/elements/command/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ pub struct SimpleCommand {

impl Command for SimpleCommand {
fn exec(&mut self, core: &mut ShellCore, pipe: &mut Pipe) -> Option<Pid> {
if self.words.len() == 0 {
return None;
}

self.args = self.words.iter()
.filter(|w| w.text != "")
.map(|w| w.text.clone()).collect();

if self.args.len() == 0 {
return None;
}

if self.force_fork
|| pipe.is_connected()
|| ! core.builtins.contains_key(&self.args[0]) {
Expand Down

0 comments on commit 4270046

Please sign in to comment.