temporalio / cli

Command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal
https://docs.temporal.io/cli
MIT License
247 stars 34 forks source link

[Bug] Using --input in a windows terminal #477

Closed svickers closed 6 months ago

svickers commented 6 months ago

What are you really trying to do?

Trying to pass input values to start a workflow.

Describe the bug

When using a command from the docs like this:

temporal workflow start --task-queue greeting-tasks --type GreetSomeone --namespace default --input '"joe"'

Receiving the error:

Error: input is not valid JSON: invalid character 'j' looking for beginning of value

Screenshot_87

Workflow

from datetime import timedelta
from temporalio import workflow

@workflow.defn
class GreetSomeone:
    @workflow.run
    async def run(self, name: str) -> str:
        return f"{name}"

Environment/Versions

cretz commented 6 months ago

You have to use Windows quote escaping, e.g. --input """joe""". This is not related to Temporal, this is a general Windows approach on how to have quotes in parameters.

(closing as question not bug, but feel free to continue commenting or join us on https://t.mp/slack or in our forums)