taking into account bsd as well
This commit is contained in:
parent
9b8897c90d
commit
c1d5b9fed6
2 changed files with 6 additions and 6 deletions
|
@ -12,7 +12,8 @@ serde = "1.0.217"
|
|||
serde_derive = "1.0.217"
|
||||
sha2 = "0.10.8"
|
||||
toml = "0.8.20"
|
||||
[target.'cfg(not(target_family = "unix"))'.dependencies]
|
||||
username = "0.2.0"
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
users = "0.11.0"
|
||||
[target.'cfg(target_family = "unix")'.dependencies]
|
||||
users = "0.11.0"
|
|
@ -7,10 +7,10 @@ use crate::refractr::Refractr;
|
|||
use clap::Parser;
|
||||
use std::path::PathBuf;
|
||||
use std::process;
|
||||
use username;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_family = "unix")]
|
||||
use users;
|
||||
#[cfg(not(target_family = "unix"))]
|
||||
use username;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(name = "refractr")]
|
||||
|
@ -41,7 +41,6 @@ fn get_config_default() -> &'static str {
|
|||
|
||||
fn main() -> Result<(), String> {
|
||||
let args = Args::parse();
|
||||
println!("{}", username::get_user_name().unwrap());
|
||||
let refractr = Refractr {
|
||||
docker: match option_env!("REFRACTR_DOCKER") {
|
||||
Some(v) => match v {
|
||||
|
|
Loading…
Add table
Reference in a new issue