felangel / mason

Tools which allow developers to create and consume reusable templates called bricks.

Home Page:https://docs.brickhub.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: ask to overwrite or not for duplicate brick name

jhj0517 opened this issue · comments

Description
Hi, Thanks for wonderful project.
It would be good if mason_cli ask to overwrite or not for duplicate brick name.

Steps To Reproduce

  1. install brick from brick.hub
mason add -g very_good_core
  1. install another brick from local with duplicate name
mason add -g very_good_core --path ./
  1. list bricks
mason ls -g
C:\Users\user\AppData\Local\Mason\Cache\global
└── very_good_core 0.6.1 -> registry.brickhub.dev

It doesn't overwrite with local brick.
However, if a local brick is installed first and then a brick from brick.hub is installed later, it overwrites the existing local brick.
Maybe bricks from brick.hub have higher priority over local bricks? It would be good if mason_cli would ask to overwrite or not for duplicate brick names.

For example, the 'very_good_core' already exists. Do you want to overwrite it? (y/n)