deno: more cleanly concat optional shell completion generation
This commit is contained in:
@@ -213,13 +213,12 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
postInstall = ''
|
||||
# Remove non-essential binaries like denort and test_server
|
||||
find $out/bin/* -not -name "deno" -delete
|
||||
|
||||
${lib.optionalString canExecute ''
|
||||
installShellCompletion --cmd deno \
|
||||
--bash <($out/bin/deno completions bash) \
|
||||
--fish <($out/bin/deno completions fish) \
|
||||
--zsh <($out/bin/deno completions zsh)
|
||||
''}
|
||||
''
|
||||
+ lib.optionalString canExecute ''
|
||||
installShellCompletion --cmd deno \
|
||||
--bash <($out/bin/deno completions bash) \
|
||||
--fish <($out/bin/deno completions fish) \
|
||||
--zsh <($out/bin/deno completions zsh)
|
||||
'';
|
||||
|
||||
doInstallCheck = canExecute;
|
||||
|
||||
Reference in New Issue
Block a user