I’m running ACF 2021 in CommandBox. I try to use C...
# box-products
j
I’m running ACF 2021 in CommandBox. I try to use CFPM…I get the error: “No Adobe 2021+ server found”. I googled. Didn’t find anything that worked. server.json has: “app”{“cfengine”“adobe@2021"}
b
@jakobward Can you run
Copy code
server list --local
j
@bdw429s
b
Are you sure you're in the correct folder?
There's no servers there
I'm a little confused since bullet train seems to disagree 🤔
Does
Copy code
server info
show a server?
j
Yes, it does.
b
Sometimes you can confuse CommandBox if you have the
server.json
in one folder and the web root pointed elsewhere
Can you show me the output??
j
^ that is the case.
b
I would cd into the web root then and try the command there
The cfpm command is doing a lookup for servers based on the current working dir
basically saying, "Get me all the servers whose web root is this directory"
j
message has been deleted
Ok, trying your advice.
Ok, that solved it! Thanks.
b
Bullet train uses the same logic
server info
uses which includes looking up the default name for a server that may exist (taking into account any server.json) and then looking for that server by name. But I avoided that logic on purpose because if you had a Lucee server AND an Adobe server in the same folder, it would sometimes find the wrong one.
👍🏻 1
I think I can improve this logic though-- if my first attempt at finding a server fails, I can try the fall back method and see if there is a server.json in there that defines an Adobe server
I'd just not run across this case before
Also, another little feature I forgot about until looking at the code just now, you can also set an env var to give the cfpm command a hint about what server name to use
Copy code
// Allow an env var hint to tell us what server to use
		// CFPM_SERVER=servername
j
Cool.
b
That ticket is fixed on the bleeding edge now.
Cfpm is a little smarter about finding the adobe server
j
Sounds good!