Closed declancm closed 3 months ago
Interesting. The quotes are not required and I often don't use them myself.
I can't reproduce your issue here. Can you tell me more about your system? It appears to be Windows of some flavor. What version? Are you running something like MinGW or cygwin? It appears, particularly because of the incorrect syntax highlighting, that your command line shell, whatever it is, is screwing up the arguments before passing them to CMock.
Oh that's weird!
I'm running PowerShell (not the Windows version) in Windows Terminal
Thanks. I'll give that a try and see if I can get it to fail too. :)
I'm able to recreate the issue with PowerShell and Windows PowerShell with and without Windows Terminal
@declancm -- thanks! I also see the problem when I issue it in PowerShell. I'll dig into it a bit and see if this is something that can just be resolved, or if I should instead update the docs. Either way, thanks for the help!
Thanks for looking into it!
Ok. I see what PowerShell does differently than others. It's noticing that USUALLY commands with a single dash flag only take a single character, so it's splitting this into two arguments. A -oblah.yml
becomes ['-o','blah.yml']
. The parser wasn't expecting this.
The fix is fairly simple, and it has the bonus of also accepting a more common cmock.rb -o blah.yml
if desired (note the space).
I've pushed the change to the cmock_2_6_rc
(release candidate) branch. If you'd like, you can pull the latest and verify it works for you too. :)
Great thank you!!
I tested out the fix and the only thing is that I need to use a relative path when there isn't a space in the command
The CMock documentation gives one example for using a config.yml file:
This wasn't working and after looking into the cmock.rb file it seems like you need to surround the path with quotes.