Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cee6c60b8 |
No files matched your search
+3
-1
@@ -3,6 +3,7 @@
|
||||
use crate::core::config;
|
||||
use crate::core::tracking;
|
||||
use crate::core::utils::{exit_code_from_output, exit_code_from_status, resolved_command};
|
||||
use std::process::Stdio;
|
||||
use anyhow::{Context, Result};
|
||||
use std::ffi::OsString;
|
||||
use std::process::Command;
|
||||
@@ -908,6 +909,7 @@ fn run_commit(args: &[String], verbose: u8, global_args: &[String]) -> Result<i3
|
||||
}
|
||||
|
||||
let output = build_commit_command(args, global_args)
|
||||
.stdin(Stdio::inherit())
|
||||
.output()
|
||||
.context("Failed to run git commit")?;
|
||||
|
||||
@@ -972,7 +974,7 @@ fn run_push(args: &[String], verbose: u8, global_args: &[String]) -> Result<i32>
|
||||
cmd.arg(arg);
|
||||
}
|
||||
|
||||
let output = cmd.output().context("Failed to run git push")?;
|
||||
let output = cmd.stdin(Stdio::inherit()).output().context("Failed to run git push")?;
|
||||
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
let stdout = String::from_utf8_lossy(&output.stdout);
|
||||
|
||||
@@ -6,7 +6,6 @@ use crate::core::utils::{exit_code_from_output, resolved_command};
|
||||
use anyhow::{Context, Result};
|
||||
use regex::Regex;
|
||||
use std::collections::HashMap;
|
||||
use std::process::Stdio;
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn run(
|
||||
@@ -29,9 +28,7 @@ pub fn run(
|
||||
let rg_pattern = pattern.replace(r"\|", "|");
|
||||
|
||||
let mut rg_cmd = resolved_command("rg");
|
||||
rg_cmd
|
||||
.args(["-n", "--no-heading", &rg_pattern, path])
|
||||
.stdin(Stdio::null());
|
||||
rg_cmd.args(["-n", "--no-heading", &rg_pattern, path]);
|
||||
|
||||
if let Some(ft) = file_type {
|
||||
rg_cmd.arg("--type").arg(ft);
|
||||
@@ -50,7 +47,6 @@ pub fn run(
|
||||
.or_else(|_| {
|
||||
resolved_command("grep")
|
||||
.args(["-rn", pattern, path])
|
||||
.stdin(Stdio::null())
|
||||
.output()
|
||||
})
|
||||
.context("grep/rg failed")?;
|
||||
|
||||
Reference in new issue
Block a user