change the FileStore::is_open() to try to connect to the sock to tetermine if a FileStore is open instead of a PID file. because when deploying with docker a process with the same PID can be running (and often is the mize process itself)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use core::result::Result::Err;
|
||||
use core::unimplemented;
|
||||
use std::ffi::OsString;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
@@ -63,16 +65,8 @@ pub fn create(sub_matches: &ArgMatches) -> MizeResult<()> {
|
||||
|
||||
pub fn is_running(sub_matches: &ArgMatches) -> MizeResult<()> {
|
||||
|
||||
let home_dir = env!("HOME");
|
||||
|
||||
if FileStore::store_is_opened(home_dir.to_owned() + "/.mize")? {
|
||||
println!("true");
|
||||
} else {
|
||||
println!("false");
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
println!("not implemented");
|
||||
Err(mize_err!("not implemented"))
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user