Skip to content

How do I stop the completion file in the archive overwriting the binary? #8

Description

@mrsimonemms

When installing the Buf binary, the gh_install command overwrites the buf binary with the bash completion file (also called buf).

Is there a way of filtering out the targets inside the library?

Command

nanolayer \
  install gh-release \
  "bufbuild/buf" \
  "buf,protoc-gen-buf-breaking,protoc-gen-buf-lint" \
  --force \
  --lib-name=buf  \
  --asset-regex='.*\.tar\.gz' 

From the logs, it looks like it's finding the buf-Linux-x86_64.tar.gz, downloading and extracting it. What's strange is that it's finding buf/etc/bash_completion.d/buf instead of buf/bin/buf.

Logs

resolved asset: buf-Linux-x86_64.tar.gz
asset recognized as an archive file
binary members found in archive are: ['buf/etc/bash_completion.d/buf', 'buf/bin/protoc-gen-buf-breaking', 'buf/bin/protoc-gen-buf-lint']
archive recognized as library (contains additional files outside of requested binaries)
extracting buf-Linux-x86_64.tar.gz into /usr/local/lib/buf
linking /usr/local/lib/buf/buf/etc/bash_completion.d/buf to /usr/local/bin/buf
linking /usr/local/lib/buf/buf/bin/protoc-gen-buf-breaking to /usr/local/bin/protoc-gen-buf-breaking
linking /usr/local/lib/buf/buf/bin/protoc-gen-buf-lint to /usr/local/bin/protoc-gen-buf-lint

Library: https://github.com/marcozac/devcontainer-features
Linked issue: marcozac/devcontainer-features#28

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions