Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brownie bake fails if the mix name capitalization does not match exactly #827

Closed
cameel opened this issue Oct 28, 2020 · 0 comments · Fixed by #829
Closed

brownie bake fails if the mix name capitalization does not match exactly #827

cameel opened this issue Oct 28, 2020 · 0 comments · Fixed by #829
Labels
bug Something isn't working

Comments

@cameel
Copy link

cameel commented Oct 28, 2020

Environment information

  • brownie Version: 1.11.10
  • ganache-cli Version: v6.9.1 (ganache-core: 2.10.2)
  • solc Version: 0.7.4
  • Python Version: 3.8.6
  • OS: linux

What was wrong?

Simply running brownie bake fails if the mix name is improperly capitalized.

brownie bake Token

Output:

Brownie v1.11.10 - Python development framework for Ethereum

Downloading from https://github.com/brownie-mix/Token-mix/archive/master.zip...
9.13kiB [00:00, 3.79MiB/s]
  File "brownie/_cli/__main__.py", line 64, in main
    importlib.import_module(f"brownie._cli.{cmd}").main()
  File "brownie/_cli/bake.py", line 26, in main
    path = project.from_brownie_mix(args["<mix>"], args["<path>"], args["--force"])
  File "brownie/project/main.py", line 577, in from_brownie_mix
    project_path.parent.joinpath(project_name + "-mix-master").rename(project_path)
  File "/usr/lib/python3.8/pathlib.py", line 1361, in rename
    self._accessor.rename(self, target)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/Token-mix-master' -> '/tmp/Token'

How can it be fixed?

brownie should either normalize the name to lower case or (if the case could be significant) report that such a mix does not exist, hinting at the case as a possible cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants