ci(postman): hotfix for stripe and nmi collections failing (#3956)

This commit is contained in:
Pa1NarK
2024-03-05 23:52:53 +05:30
committed by GitHub
parent c09b2b3a2a
commit 1a8056799c
7 changed files with 1291 additions and 1330 deletions

View File

@ -18,17 +18,21 @@ fn main() {
// Filter out None values leaving behind Some(Path)
let paths: Vec<String> = runner.modified_file_paths.into_iter().flatten().collect();
let git_status = Command::new("git").arg("restore").args(&paths).output();
match git_status {
Ok(output) => {
if !output.status.success() {
if !paths.is_empty() {
let git_status = Command::new("git").arg("restore").args(&paths).output();
match git_status {
Ok(output) if !output.status.success() => {
let stderr_str = String::from_utf8_lossy(&output.stderr);
eprintln!("Git command failed with error: {stderr_str}");
}
}
Err(e) => {
eprintln!("Error running Git: {e}");
Ok(_) => {
println!("Git restore successful!");
}
Err(e) => {
eprintln!("Error running Git: {e}");
}
}
}