Skip to content

Commit 2d7b505

Browse files
authored
Report and forgive missing plugins in make_docs.nu (#2017)
1 parent 3f611ed commit 2d7b505

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

make_docs.nu

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ def plugin-paths [ nu_path?: path ] {
1414
_ => ($nu_path | path dirname)
1515
}
1616

17-
$PLUGINS | each {|plugin|
17+
let plugin_paths = $PLUGINS | each {|plugin|
1818
match (sys host | get name) {
1919
'Windows' => $'($nu_dir | path join $plugin).exe'
2020
_ => $'($nu_dir | path join $plugin)'
2121
}
2222
}
23+
24+
let decorated = $plugin_paths | wrap path | insert exists {|x| $x.path | path exists }
25+
$decorated | where not exists | each {|x| print $"(ansi red)No plugin under path '($x.path)', will be skipped...(ansi reset)" }
26+
27+
$decorated | where exists | get path
2328
}
2429

2530
# get all command names from a clean scope

0 commit comments

Comments
 (0)