Copy link to clipboard
Copied
I'm trying to use the scan command for cfpm (on a Windows machine). I have taken the following steps:
I get the following error message:
Incorrect usage of scan command. It must be scan CODEBASEPATH CFSERVERURL.
The "c:\path\to\application" is correct and exists. I am issuing the scan command from the cfpm prompt. Any suggestions why I am receiving this error would be helpful.
Thanks
Yes, and in that talk, when I was demonstrating that I clarified both that a) it's with CF2023 that you no longer need the url and b) that with cf2021 update 5 and beyond the scan no longer works at all as that url is never recognized as valid. Catch-22,for sure.
So I mentioned as well that one could certainly install cf2023 (on the same or another machine) to use that to scan your code (there should be no difference in the result).
Another option I failed to mention (but thought of right af
...Copy link to clipboard
Copied
I don't know much about cfpm, but would guess it's because you're not specifying a CFSERVERURL attribute.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Yes, and in that talk, when I was demonstrating that I clarified both that a) it's with CF2023 that you no longer need the url and b) that with cf2021 update 5 and beyond the scan no longer works at all as that url is never recognized as valid. Catch-22,for sure.
So I mentioned as well that one could certainly install cf2023 (on the same or another machine) to use that to scan your code (there should be no difference in the result).
Another option I failed to mention (but thought of right after and meant to demo and blog about) is that if you installed cf2021 using the full/gui installer, you could get the zip "installer" instead and extract that, and use the tool in there. As. I noted in the session, since the cf2023 cfpm scan does NOT require that Cf be running, you need not fear any conflict in doing that. (And you should not need to run the cfinstall.bat or .sh, which WOULD offer to setup the service to run that new instance.)
(And those who had already implemented cf2021 already via the zip could just implement the new one in a new folder.)
Either way, don't update that new zip-based instance to update or later lest it break this scan tool. And obviously don't use it to run code since you'll not be updating it.
And all this will be obviated/mitigated when Adobe addresses the bug with CF2021, whose tracker ticket I pointed out I see now I failed to point out in the talk. It's here (and I've just updated the slidedeck to have it):
https://tracker.adobe.com/#/view/CF-4216277
Again, I've yet to test this zip approach. If you try it, let us know. I'm writing all this on my phone at the moment.
Copy link to clipboard
Copied
Genius! Can confirm the "zip approach" works on both Windows and Mac.
We can't / aren't allowed to install CF on machines but we are allowed to use CommandBox so I had also been trying to use cfpm via CommandBox and that was also producing errors so this solution is very helpful for our current need.
Thanks very much for suggesting it.
Copy link to clipboard
Copied
Glad to have helped.
FWIW, you could also have started a Commandbox cf2021 instance that was left at update 4 or earlier. It's just a bit of a hassle digging deep (into the structure of how it implements itself) to find that cfusion/bin folder, whereas with the zip it's easy to find. 🙂