Skip to content

Inline variables flag failing and not giving error on Windows #114

Description

@priyanshugahlot2004

kane-cli version

0.4.8

Operating System

Windows (x64)

Installation method

npm

What happened?

The kane-cli run command fails to parse JSON variables on Windows unless they are escaped with backslashes and the entire JSON string is wrapped in double quotes. The same commands work perfectly on macOS with both single quotes and unescaped JSON.

Additional details

Steps to Reproduce

On macOS (both work correctly):

# With single quotes and not escaping the JSON
kane-cli run "open google.com and type {{test2}} in the search field" --variables '{"test2": {"value": "testvar2"}}'

On Windows (both fail silently):

# With single quotes - FAILS
kane-cli run "open google.com and type {{test2}} in the search field" --variables '{"test2": {"value": "testvar2"}}'

# Without escaping - FAILS
kane-cli run "open google.com and type {{test2}} in the search field" --variables '{\"test2\": {\"value\": \"testvar2\"}}'

There is no Error logging:

Image

On Windows (only workaround that works):

# Escaped with backslashes and the entire JSON string is wrapped in double quotes work - WORKS
kane-cli run "open google.com and type {{test2}} in the search field" --variables "{\"test2\": {\"value\": \"testvar2\"}}"

Expected Behavior

  • The command should parse the JSON variables correctly on Windows, same as macOS

Actual Behavior

On Windows:

  • No error message is displayed
  • The action does not execute
  • Only the command escaped with backslashes and the entire JSON string is wrapped in double quotes work

Environment

  • OS: Windows
  • kane-cli version: 0.4.8
  • Node version: v24.16.0

Error output / logs

C:\Users\priyanshug>kane-cli run "open google.com and type {{test2}} in the search field" --variables '{"test2": {"value": "testvar2"}}' --agent
{"type":"recording_state","enabled":true,"session_id":"468efb7f-a624-4942-8fef-9d7845af1901","persist":false}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions