Skip to content

[BUG] TEST: Potential Bug β€” fab exists returns strings instead of booleans in --output_format json (upstream #107)Β #56

@ayeshurun

Description

@ayeshurun

πŸ“‹ Copied from microsoft/fabric-cli#107 for AI triage testing.
Expected triage outcome: Potential Bug


Bug Description

When output_format=json is configured (either via config file or --output_format json argument) the exists command returns boolean values as strings "true" or "false" instead of native JSON booleans. This forces the user to parse strings instead of using boolean values directly. Furthermore this can cause logic errors as "false" is truthy in conditional checks.

fab exists ws1.Workspace/lh1.Lakehouse --output_format json
{
    "timestamp": "2025-12-29T16:42:07.387900Z",
    "status": "Success",
    "command": "exists",
    "result": {
        "message": "true"
    }
}

fabric-cli version

1.3.1.

Python version

3.12.3

Operating System

Windows

CLI Mode

Command line mode

Authentication Method

Service principal (secret)

Steps to Reproduce

fab exists / --output_format json
{
    "timestamp": "2025-12-29T16:42:07.387900Z",
    "status": "Success",
    "command": "exists",
    "result": {
        "message": "true"
    }
}

Expected Behavior

fab exists / --output_format json
{
    "timestamp": "2025-12-29T16:42:07.387900Z",
    "status": "Success",
    "command": "exists",
    "result": {
        "message": true
    }
}

Actual Behavior

fab exists / --output_format json
{
    "timestamp": "2025-12-29T16:42:07.387900Z",
    "status": "Success",
    "command": "exists",
    "result": {
        "message": "true"
    }
}

Additional Context

No response

Possible Solution

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions