'Unterminated quoted string' when installing elastic-agent

Getting this error when running the curl installation command on my VM. I'm running Kali Linux through UTM on a Mac.

"./elastic-agent: 3: Syntax error: Unterminated quoted string"

Couldn't see anything wrong with the config file but maybe I'm looking for the wrong thing? When I run the installation command it starts initially, runs through a bunch of files, asks for my password, and then gives me the error. Any help would be appreciated!