timetrack works locally
This commit is contained in:
@@ -11,7 +11,7 @@ use serde::{Deserialize, Serialize};
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::Write;
|
||||
use std::{path::PathBuf, thread};
|
||||
use tracing::info;
|
||||
use tracing::{info, warn};
|
||||
|
||||
// console_log macro
|
||||
// that can be copied into other files for debugging purposes
|
||||
@@ -658,6 +658,11 @@ fn update_spacetimedb_token(new_token: &str) -> MizeResult<()> {
|
||||
|
||||
let file_path = config_dir.join("spacetime").join("cli.toml");
|
||||
|
||||
if !file_path.exists() {
|
||||
warn!("spacetime config file does not exist, not updating token there");
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
// Read existing file (or create empty document if it doesn't exist)
|
||||
let content = std::fs::read_to_string(&file_path).unwrap_or_default();
|
||||
let mut data = ItemData::from_toml(content.as_str())?;
|
||||
|
||||
Reference in New Issue
Block a user