Unverified Commit f2461785 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

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

parents ac65bb86 6766c636
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
{ 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) \