We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a0034c commit ba8390dCopy full SHA for ba8390d
1 file changed
node/src/manager/commands/dump.rs
@@ -1,7 +1,7 @@
1
use std::fs;
2
use std::sync::Arc;
3
4
-use graph::{bail, prelude::anyhow::Result};
+use graph::prelude::anyhow::Result;
5
6
use graph_store_postgres::{ConnectionPool, SubgraphStore};
7
@@ -13,15 +13,8 @@ pub async fn run(
13
deployment: DeploymentSearch,
14
directory: String,
15
) -> Result<()> {
16
+ fs::create_dir_all(&directory)?;
17
let directory = fs::canonicalize(&directory)?;
- let stat = fs::metadata(&directory)?;
18
-
19
- if !stat.is_dir() {
20
- bail!(
21
- "The path `{}` is not a directory",
22
- directory.to_string_lossy()
23
- );
24
- }
25
26
let loc = deployment.locate_unique(&primary_pool).await?;
27
0 commit comments