felangel / mason

Tools which allow developers to create and consume reusable templates called bricks.
https://docs.brickhub.dev
980 stars 97 forks source link

fix: Misleading message when running make and having an invalid path brick globally #1203

Open erickzanardo opened 9 months ago

erickzanardo commented 9 months ago

Description

When having an invalid global installed brick, like for example a brick named foo that was installed from path, and such folder/path was deleted, when running mason make x we will get an error saying Could not find brick at path/foo, which can be confused since we are running mason make x.

Steps To Reproduce

  1. Install any brick globally from path
  2. Remove that path from the filesytem
  3. Try running mason make any_brick
  4. See error

Expected Behavior

Unsure what would be the best here, but I feel that it should either not give any error, and an error should occur only when trying to use the invalid brick, or maybe just silently removing the invalid brick from the mason lock?

felangel commented 9 months ago

Thanks for reporting this! Curious to see how pub handles this situation. Either way I'll get a fix shortly, thanks! 🙏