mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
fix: panic on failure to get current exe
This commit is contained in:
parent
5f68fee1a9
commit
75152bd384
1 changed files with 3 additions and 10 deletions
|
@ -24,16 +24,9 @@ pub async fn check_env() -> (bool, Vec<u8>, Vec<u8>) {
|
||||||
let signature: Vec<u8> = vec![0x4f, 0x3e, 0xf8, 0x41, 0xc3, 0x3a, 0x52, 0x16];
|
let signature: Vec<u8> = vec![0x4f, 0x3e, 0xf8, 0x41, 0xc3, 0x3a, 0x52, 0x16];
|
||||||
|
|
||||||
// Read the current lune binary to memory
|
// Read the current lune binary to memory
|
||||||
let bin = if let Ok(contents) = read_to_vec(match env::current_exe() {
|
let bin = if let Ok(contents) = read_to_vec(
|
||||||
Ok(path) => path,
|
env::current_exe().expect("failed to get path to current running lune executable"),
|
||||||
Err(err) => {
|
)
|
||||||
eprintln!(
|
|
||||||
"WARN: Couldn't get path to currently running lune executable; err: {}",
|
|
||||||
err.kind()
|
|
||||||
);
|
|
||||||
process::exit(1);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
contents
|
contents
|
||||||
|
|
Loading…
Add table
Reference in a new issue