serverless / compose

Orchestrate Serverless Framework in monorepos
https://serverless.com/framework/docs/guides/compose
MIT License
111 stars 15 forks source link

Cannot run service commands containing a colon #186

Open Brewal opened 1 year ago

Brewal commented 1 year ago

Are you certain it's a bug?

Are you using the latest version?

Is there an existing issue for this?

Issue description

When trying to run a command with compose that contains a : character, it seems to be replaced with a space. I tried to escape the colon, put the command between double quotes, ... with no luck.

Same goes with the shortcut alternative :

serverless api:bref:cli --args="list"

Service configuration (serverless-compose.yml) content

services:
  api:
    path: api

Command name and used flags

serverless bref:cli --service=api --args="list"

Command output

Error:
Serverless command "bref cli" not found. Did you mean "bref:cli"? Run "serverless help" for a list of all available commands.
mnapoli commented 1 year ago

@Brewal that is related to how Bref commands look (they follow the Symfony Console pattern so that they look more familiar to PHP devs).

Long story short, they are not supported by Serverless Compose because of that :.

Brewal commented 1 year ago

Thanks for the response ! So I understand that this won't be fix and that there's no other workaround than cd into the corresponding service directory and use the regular serverless command ?

I'm a bit curious about why this is a limitation :)

mnapoli commented 1 year ago

I think so yes. One way to fix this would be to update Bref's repo to support both bref:cli and bref cli, that would be doable I think.