If you have uninstalled fig from command line as fig.io doc recommended (https://fig.io/user-manual/other/uninstall);

When you try to install fig from terminal with brew the exception in title will occur.
To fix this issue it’s enough to use brew with reinstall argument;
brew reinstall fig
That’s all.