mirror of
https://github.com/Pagwin-Fedora/ppi.git
synced 2025-07-17 22:15:42 +00:00
project rename and using project name instead of hardcoded value for config dir
This commit is contained in:
parent
5d04294dca
commit
ee5bec00e9
3 changed files with 16 additions and 16 deletions
24
Cargo.lock
generated
24
Cargo.lock
generated
|
@ -306,6 +306,18 @@ version = "0.3.25"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
|
||||
|
||||
[[package]]
|
||||
name = "ppi"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"dirs",
|
||||
"git2",
|
||||
"rlua",
|
||||
"serde",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error"
|
||||
version = "1.0.4"
|
||||
|
@ -339,18 +351,6 @@ dependencies = [
|
|||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "project_init"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"dirs",
|
||||
"git2",
|
||||
"rlua",
|
||||
"serde",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.21"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[package]
|
||||
name = "project_init"
|
||||
name = "ppi"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "3.2.22", features = ["derive"] }
|
||||
clap = { version = "3.2.22", features = ["derive", "cargo"] }
|
||||
dirs = "4.0.0"
|
||||
git2 = "0.15.0"
|
||||
rlua = "0.19.4"
|
||||
|
|
|
@ -22,7 +22,7 @@ pub fn main() {
|
|||
let mut buf = String::new();
|
||||
let _ = std::fs::File::open(
|
||||
{let mut n = dirs::config_dir().expect("no config dir so edit the source code to make it work buddy");
|
||||
n.push("pag-project-init/config.toml");
|
||||
n.push(clap::crate_name!().to_owned() + "/config.toml");
|
||||
n
|
||||
}).expect("error opening file").read_to_string(&mut buf);
|
||||
buf
|
||||
|
@ -34,7 +34,7 @@ pub fn main() {
|
|||
{
|
||||
let scripts = scripts.keys().map(String::clone).collect::<HashSet<String>>();
|
||||
let skeletons = skeletons.keys().map(String::clone).collect::<HashSet<String>>();
|
||||
if scripts.union(&skeletons).count() > 0 {
|
||||
if scripts.intersection(&skeletons).count() > 0 {
|
||||
panic!("Overlap between skeletons and scripts");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue