feat: finish django cli and add aliases
Implemented basic wanted functionality for django subcommands. Added single or two letter aliases for all subsubcommands.
This commit is contained in:
@@ -3,7 +3,12 @@ pub mod docker;
|
||||
pub mod docker_compose;
|
||||
pub mod postgres;
|
||||
|
||||
use std::{ffi::OsStr, process::Command};
|
||||
use std::{
|
||||
ffi::OsStr,
|
||||
fs::{File, OpenOptions},
|
||||
path::PathBuf,
|
||||
process::Command,
|
||||
};
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
@@ -43,3 +48,11 @@ impl DockerCommand {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn safe_create_file(path: PathBuf) -> Result<File, std::io::Error> {
|
||||
OpenOptions::new().write(true).create_new(true).open(path)
|
||||
}
|
||||
|
||||
fn create_file(path: PathBuf) -> Result<File, std::io::Error> {
|
||||
OpenOptions::new().write(true).create(true).open(path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user