diff --git a/lib/config.nu b/lib/config.nu index a571608..053d342 100644 --- a/lib/config.nu +++ b/lib/config.nu @@ -5,7 +5,12 @@ export def read_file [app: string, filename = "config.toml"] { # returns the path to an apps config dir export def get_path [app: string] { - let local = ( $env.HOME | path join ".config" | path join $app ) + let home = $env.HOME? + + if $home == null { + "/etc" | path join $app + } + let local = ( $home | path join ".config" | path join $app ) if ( $local | path exists ) { $local