Skip to content

Commit

Permalink
mkdir -p
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Nov 28, 2024
1 parent 20e890b commit 3ebce58
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/risedevtool/src/task/meta_node_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ fn sql_endpoint_from_env() -> String {
// Act as if `meta-backend: sqlite` is specified.
// Not using a temporary file because we want to persist the data across restarts.
let prefix_data = env::var("PREFIX_DATA").unwrap();
let path = PathBuf::from(&prefix_data)
.join("meta-backend-env-fallback-sqlite")
.join("metadata.db");
let dir = PathBuf::from(&prefix_data).join("meta-backend-env-fallback-sqlite");
fs_err::create_dir_all(&dir).unwrap();

let path = dir.join("metadata.db");
let sqlite_endpoint = format!("sqlite://{}?mode=rwc", path.to_string_lossy());
tracing::warn!(
"env RISEDEV_SQL_ENDPOINT not set, use fallback sqlite `{}`",
Expand Down

0 comments on commit 3ebce58

Please sign in to comment.