gitignore creation command

This commit is contained in:
aaron-jack-manning
2022-08-22 18:51:54 +10:00
parent 4f44f6d894
commit f43d583ae6
3 changed files with 17 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
use crate::error;
use std::fs;
use std::path;
use std::process;
@@ -20,3 +21,7 @@ pub fn run_command(args : Vec<String>, vault_folder : &path::Path) -> Result<(),
Ok(())
}
pub fn create_gitignore(vault_folder : &path::Path) -> Result<(), error::Error> {
Ok(fs::write(vault_folder.join(".gitignore"), "state.toml\ntemp.toml\ntemp.md")?)
}