a couple of small fixes
This commit is contained in:
parent
2aa855f5cf
commit
6edfe7cf29
2 changed files with 7 additions and 3 deletions
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue