Skip to content

Commit

Permalink
fix: $env.ASDF_NU_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzk committed Sep 1, 2023
1 parent 0ad180f commit 6ac72ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion asdf.nu
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
def-env configure-asdf [] {

$env.ASDF_NU_DIR = (brew --prefix asdf | str trim | into string | path join 'libexec')

$env.ASDF_DIR = ( if ( $env | get --ignore-errors ASDF_DIR | is-empty ) { $env.ASDF_NU_DIR } else { $env.ASDF_DIR } )

let shims_dir = ( if ( $env | get --ignore-errors ASDF_DATA_DIR | is-empty ) { $env.HOME | path join '.asdf' } else { $env.ASDF_DIR } | path join 'shims' )

let asdf_bin_dir = ( $env.ASDF_DIR | path join 'bin' )


$env.PATH = ( $env.PATH | split row (char esep) | where { |p| $p != $shims_dir } | prepend $shims_dir )
$env.PATH = ( $env.PATH | split row (char esep) | where { |p| $p != $asdf_bin_dir } | prepend $asdf_bin_dir )

Expand Down

0 comments on commit 6ac72ce

Please sign in to comment.