uv: only generate shell completions when possible (#358982)

This commit is contained in:
Masum Reza 2024-11-27 23:48:41 +05:30 committed by GitHub
commit ac2eacd373
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,6 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
installShellFiles,
@ -40,7 +41,7 @@ rustPlatform.buildRustPackage rec {
# Tests require python3
doCheck = false;
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
export HOME=$TMPDIR
installShellCompletion --cmd uv \
--bash <($out/bin/uv --generate-shell-completion bash) \