gitignore creation command
This commit is contained in:
@@ -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")?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user