File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
nu-hooks/nu-hooks/rusty-paths Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1313$env . config = ($env . config | upsert hooks. env_change. PWD {
1414 append {
1515 condition: {| _, after| ($after | path join 'Cargo . lock' | path exists) }
16- code: {
16+ code: {| _ , after |
1717 $env . PATH = (
1818 $env . PATH
19- | prepend ($env . PWD | path join 'target' ' debug')
20- | prepend ($env . PWD | path join 'target' ' release')
19+ | prepend ($after | path join 'target' ' debug')
20+ | prepend ($after | path join 'target' ' release')
21+ | uniq
22+ )
23+ }
24+ }
25+ | append {
26+ condition: {| before, _| ($before | default '' | path join 'Cargo . lock' | path exists) }
27+ code: {| before, _|
28+ $env . PATH = (
29+ $env . PATH
30+ | where $it != ($before | path join 'target' ' debug')
31+ | where $it != ($before | path join 'target' ' release')
2132 | uniq
2233 )
2334 }
You can’t perform that action at this time.
0 commit comments