Skip to content

Commit

Permalink
fix plugin register
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer committed Jun 29, 2024
1 parent 23feca3 commit c405121
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion nu/register-plugins.nu
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def main [
print $'All plugins found in Nu directory:'
print $allPlugins
print $'Is true: ($enablePlugins == true) ($enablePlugins == "true")'
let filteredPlugins = if $'($enablePlugins)' == 'true' { $allPlugins } else {
let filteredPlugins = if ($enablePlugins | into bool) == 'true' {
$allPlugins
} else {
$allPlugins | filter {|it| $enablePlugins =~ ($it.name | path basename | split row . | first)}
}

Expand Down
4 changes: 3 additions & 1 deletion src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ def main [
print $'All plugins found in Nu directory:'
print $allPlugins
print $'Is true: ($enablePlugins == true) ($enablePlugins == "true")'
let filteredPlugins = if $'($enablePlugins)' == 'true' { $allPlugins } else {
let filteredPlugins = if ($enablePlugins | into bool) == 'true' {
$allPlugins
} else {
$allPlugins | filter {|it| $enablePlugins =~ ($it.name | path basename | split row . | first)}
}
Expand Down

0 comments on commit c405121

Please sign in to comment.