homebrew – brew cask install emacs takes control of the emacs command line command

I am currently using Homebrew to install both the Emacs command line version and the emacs GUI version, with the following commands:

brew install emacs
brew cask install emacs

When I first install the command line version, I can start it through the command line with the command emacs , but after installing the GUI version, using the same command causes the GUI version to open. I would like the command line version to continue opening from the command line command. I posted this on the homebrew forum, but the only answer they gave me was to verify my shell configuration file. I'm at MacOS Catalina, so I guess .zshrc it's the file, but it doesn't contain anything related to Emacs. Any suggestions on how to prevent the GUI version from starting from the command line command would be greatly appreciated.