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
|
/// 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]!
|
/// This directory is not guaranteed to exist! If you need it to, use [config_directory]!
|
||||||
pub fn get_config_directory(system: bool) -> PathBuf {
|
pub fn get_config_directory(system: bool) -> PathBuf {
|
||||||
|
|
|
@ -43,7 +43,9 @@ fn main() -> std::io::Result<()> {
|
||||||
|
|
||||||
if args.initalize {
|
if args.initalize {
|
||||||
pacwoman::create_directories(!args.user)?;
|
pacwoman::create_directories(!args.user)?;
|
||||||
|
if !args.user {
|
||||||
pacwoman::init_gpg()?;
|
pacwoman::init_gpg()?;
|
||||||
|
}
|
||||||
|
|
||||||
std::fs::write(
|
std::fs::write(
|
||||||
pacwoman::config_directory(!args.user)?.join("mirrors"),
|
pacwoman::config_directory(!args.user)?.join("mirrors"),
|
||||||
|
@ -73,7 +75,9 @@ fn main() -> std::io::Result<()> {
|
||||||
.set_repo(repo.clone())
|
.set_repo(repo.clone())
|
||||||
.set_arch(std::env::consts::ARCH.to_string())
|
.set_arch(std::env::consts::ARCH.to_string())
|
||||||
.clone(),
|
.clone(),
|
||||||
).is_ok() {
|
)
|
||||||
|
.is_ok()
|
||||||
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue