a couple of small fixes

This commit is contained in:
Arthur Beck 2025-03-10 20:39:49 -05:00
parent 2aa855f5cf
commit 6edfe7cf29
Signed by: ArthurB
GPG key ID: ACE3D14F5CEF14BF
2 changed files with 7 additions and 3 deletions

View file

@ -210,7 +210,7 @@ pub fn base_dir() -> std::io::Result<PathBuf> {
}
/// Get the config directory. If for the entire system, then it will be /pacwoman/config, otherwise
/// it will be /pacwomand/user/{user name from [get_current_user]}/config.
/// it will be /pacwoman/user/{user name from [get_current_user]}/config.
///
/// This directory is not guaranteed to exist! If you need it to, use [config_directory]!
pub fn get_config_directory(system: bool) -> PathBuf {

View file

@ -43,7 +43,9 @@ fn main() -> std::io::Result<()> {
if args.initalize {
pacwoman::create_directories(!args.user)?;
pacwoman::init_gpg()?;
if !args.user {
pacwoman::init_gpg()?;
}
std::fs::write(
pacwoman::config_directory(!args.user)?.join("mirrors"),
@ -73,7 +75,9 @@ fn main() -> std::io::Result<()> {
.set_repo(repo.clone())
.set_arch(std::env::consts::ARCH.to_string())
.clone(),
).is_ok() {
)
.is_ok()
{
ok = true;
break;
}