VS Code companion (#461)
* Init port discovery * Fmt * Remove unused * Fmt * Simplify * Container lookup API * Isolated task details * Fmt * Lint and format * Lint
This commit is contained in:
committed by
GitHub
parent
e970a6eb75
commit
141e1686fd
@@ -8,6 +8,7 @@ pub mod diff;
|
||||
pub mod log_msg;
|
||||
pub mod msg_store;
|
||||
pub mod path;
|
||||
pub mod port_file;
|
||||
pub mod response;
|
||||
pub mod sentry;
|
||||
pub mod shell;
|
||||
|
||||
12
crates/utils/src/port_file.rs
Normal file
12
crates/utils/src/port_file.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use std::{env, path::PathBuf};
|
||||
|
||||
use tokio::fs;
|
||||
|
||||
pub async fn write_port_file(port: u16) -> std::io::Result<PathBuf> {
|
||||
let dir = env::temp_dir().join("vibe-kanban");
|
||||
let path = dir.join("vibe-kanban.port");
|
||||
tracing::debug!("Writing port {} to {:?}", port, path);
|
||||
fs::create_dir_all(&dir).await?;
|
||||
fs::write(&path, port.to_string()).await?;
|
||||
Ok(path)
|
||||
}
|
||||
Reference in New Issue
Block a user