ruff: only generate completions if program can be executed

This commit is contained in:
Stefan Frijters 2024-06-05 23:39:42 +02:00
parent e0bacc930f
commit 7046b87dd3
No known key found for this signature in database
GPG Key ID: 7619A6BC6E7DFA6F

View File

@ -64,7 +64,7 @@ rustPlatform.buildRustPackage rec {
"--skip=semantic::types::infer::tests::resolve_visible_def"
];
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd ruff \
--bash <($out/bin/ruff generate-shell-completion bash) \
--fish <($out/bin/ruff generate-shell-completion fish) \