Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Extra file downloads handle filenames incorrectly #75

Open
tylerpotts opened this issue Oct 18, 2022 · 0 comments
Open

Extra file downloads handle filenames incorrectly #75

tylerpotts opened this issue Oct 18, 2022 · 0 comments
Labels
type: bug 🐛 Something isn't working

Comments

@tylerpotts
Copy link
Contributor

Summary

when using ib_manifest_util download_packages --manifest_path ./hardening_manifest.yaml the filename specified in hardening_manifesy.yaml isn't the name that is used to save the file. This comes from this odd logic:

        fname = url.split("/")[-1].lstrip("_")
...
                with open(download_path / fname, "wb") as f:
                    f.write(r.content)

https://github.com/MetroStar/ib_manifest_util/blob/dev/ib_manifest_util/download_conda_packages.py#L67

Proposed implementation

Fix this by making the fname come from the manifest name such as:

resources:
  - url: https://github.com/dirkcgrunwald/jupyter_codeserver_proxy-/archive/5596bc9c2fbd566180545fa242c659663755a427.tar.gz
    filename: code_server.tar.gz
    validation:
      type: sha256

Where the expected downloaded file will be code_server.tar.gz and not 5596bc9c2fbd566180545fa242c659663755a427.tar.gz

@tylerpotts tylerpotts added the type: bug 🐛 Something isn't working label Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant