Commit b0e8cc52 authored by Edwin Mackenzie-Owen's avatar Edwin Mackenzie-Owen
Browse files

k9s: fix broken completion scripts on aarch64-darwin

k9s apparently requires a writeable log location. Before this commit;
the generated bash, fish, and zsh completion files in the
aarch64-darwin* build had as their first line the error message:
Fail to init k9s logs location could not create any of the following paths: /homeless-shelter/Library/Application Support

* Yes, really only on  aarch64-darwin. x86_64-darwin, x86_64-linux, and
  aarch64-linux are fine. Don't ask me why.
parent 57168413
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -42,6 +42,11 @@ buildGoModule rec {

  nativeBuildInputs = [ installShellFiles ];
  postInstall = ''
    # k9s requires a writeable log directory
    # Otherwise an error message is printed
    # into the completion scripts
    export K9S_LOGS_DIR=$(mktemp -d)

    installShellCompletion --cmd k9s \
      --bash <($out/bin/k9s completion bash) \
      --fish <($out/bin/k9s completion fish) \