Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/find/matchers/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ impl SingleExecMatcher {

impl Matcher for SingleExecMatcher {
fn matches(&self, file_info: &WalkEntry, _: &mut MatcherIO) -> bool {
let mut command = Command::new(&self.executable);
let mut command;
if &self.executable == "{}" {
command = Command::new(file_info.path());
} else {
command = Command::new(&self.executable);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let mut command;
if &self.executable == "{}" {
command = Command::new(file_info.path());
} else {
command = Command::new(&self.executable);
}
let mut command =
if &self.executable == "{}" {
Command::new(file_info.path())
} else {
Command::new(&self.executable)
};

let path_to_file = if self.exec_in_parent_dir {
if let Some(f) = file_info.path().file_name() {
Path::new(".").join(f)
Expand Down
Loading