Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Outdated example for programatic "create formula" #150

Open
andrevtg opened this issue Aug 25, 2021 · 1 comment
Open

Outdated example for programatic "create formula" #150

andrevtg opened this issue Aug 25, 2021 · 1 comment

Comments

@andrevtg
Copy link

The programatic way to execute rit create formula has a non-working example in the Core commands page.

A working example follows below:

cat << EOF |
{
    "formulaCmd": "rit oioi teste",
    "lang": "shell-bat",
    "workspace": {"name": "my-formulas", "dir": "/home/fulano/projetos/xxx" },
    "formulapath": "/home/fulano/projetos/xxx/oioi/teste/"
  }
EOF
rit create formula --stdin

If there is another way to do the same without stdin (using flags) current docs do not show it too.

@GuillaumeFalourd
Copy link
Contributor

GuillaumeFalourd commented Aug 25, 2021

Hi @andrevtg , thank you for opening this issue 👍🏼

You're right, this core command doesn't use these inputs anymore and we'll have to update it on the documentation.

You can check which inputs are available by using rit create formula --help and you'll see that in the latest version the inputs are now:

Options:
      --language='': Select formula's language (i.e: go, java, python [...])
      --name='': You must create your command based in this example [rit group verb noun]
      --workspace='': Provide workspace name

Therefore, the correct syntax is now something like this: echo '{"name":"rit demo create formula", "language":"shell", "workspace":"Default"}' | rit create formula --stdin

Spoiler: the next release (2.12.0) will also provide support for inputs flags, allowing you to create formulas using: rit create formula --name="rit demo create formula" --language="shell" --workspace="Default"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants