forked from Cutieguwu/raven
I think I finished it...
This commit is contained in:
@@ -5,8 +5,8 @@ use std::path::{Path, PathBuf};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::dependency::Dependency;
|
||||
use crate::meta::Meta;
|
||||
use crate::prelude::Dependency;
|
||||
use crate::workspace::Workspace;
|
||||
|
||||
pub const F_NEST_TOML: &str = "Nest.toml";
|
||||
@@ -30,6 +30,11 @@ impl Nest {
|
||||
}
|
||||
|
||||
pub fn write<P: AsRef<Path>>(&self, path: P) -> crate::Result<()> {
|
||||
let mut path = path.as_ref().to_path_buf();
|
||||
if path.is_dir() {
|
||||
path = path.join(F_NEST_TOML);
|
||||
}
|
||||
|
||||
Ok(OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
|
||||
Reference in New Issue
Block a user