Compare commits
No commits in common. "df5776e76d11174a06d6a8859ec9be07d78eb09b" and "8e6950270e31f7cbe41d9f17b42f475cbf24e5d5" have entirely different histories.
df5776e76d
...
8e6950270e
|
@ -18,19 +18,9 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Compile and release
|
||||
id: compile
|
||||
uses: rust-build/rust-build.action@v1.4.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
RUSTTARGET: ${{ matrix.target }}
|
||||
ARCHIVE_TYPES: ${{ matrix.archive }}
|
||||
UPLOAD_MODE: 'none'
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Binary
|
||||
path: |
|
||||
${{ steps.compile.outputs.BUILT_ARCHIVE }}
|
||||
${{ steps.compile.outputs.BUILT_CHECKSUM }}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "kr"
|
||||
version = "1.0.1"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
|
|
@ -84,7 +84,7 @@ fn check_history(retry: &Retry) -> bool {
|
|||
return retry.history.len().lt(&usize::from(retry.max_retries))
|
||||
}
|
||||
|
||||
fn spawn_process(retry: &Retry) -> Result<Child, std::io::Error> {
|
||||
fn spawn_process(retry: &Retry) -> std::io::Result<Child> {
|
||||
let mut command_parts: Vec<String> = retry
|
||||
.command
|
||||
.split_whitespace()
|
||||
|
@ -95,10 +95,7 @@ fn spawn_process(retry: &Retry) -> Result<Child, std::io::Error> {
|
|||
command_parts.remove(0);
|
||||
command.args(command_parts);
|
||||
|
||||
match command.spawn() {
|
||||
Ok(child) => Ok(child),
|
||||
Err(err) => Err(err),
|
||||
}
|
||||
return command.spawn();
|
||||
}
|
||||
|
||||
fn run_command(retry: &mut Retry) {
|
||||
|
@ -123,7 +120,7 @@ fn run_command(retry: &mut Retry) {
|
|||
println!("Restarting...");
|
||||
restart(retry);
|
||||
} else {
|
||||
println!("The process has crashed more than {} times in the past {}, stop restarting\n", retry.max_retries, retry.restart_name);
|
||||
print!("The process has crashed more then {} times in the past {}, stop restarting\n", retry.max_retries, retry.restart_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue