tenv: only generate shell completions when possible (#351899)

This commit is contained in:
Nick Cao
2024-10-29 15:26:59 -04:00
committed by GitHub
+2 -2
View File
@@ -1,4 +1,4 @@
{ buildGoModule, fetchFromGitHub, installShellFiles, lib, tenv, testers }:
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles, lib, tenv, testers }:
buildGoModule rec {
pname = "tenv";
@@ -23,7 +23,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd tenv \
--zsh <($out/bin/tenv completion zsh) \
--bash <($out/bin/tenv completion bash) \