Skip to content

[BUG] fab exists returns strings instead of booleans in --output_format json #107

@Guust-Franssens

Description

@Guust-Franssens

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 <workspace>/<item> --output_format json
{
    "timestamp": "2025-12-29T16:42:07.387900Z",
    "status": "Success",
    "command": "exists",
    "result": {
        "message": "true"
    }
}

Expected Behavior

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

Actual Behavior

fab exists <workspace>/<item> --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

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions