Skip to content

windscribe-cli disconnect should not exit with error if it's disconnected already #286

@johan456789

Description

@johan456789

Describe the bug

windscribe-cli disconnect exits with error if it's disconnected already.

OS and app information:

  • OS: MacOS Version 15.6.1 (Build 24G90)
  • App version: windscribe-cli v2.19.7

To Reproduce
Steps to reproduce the behavior:

  1. start windscribe app without disconnecting
  2. run windscribe-cli disconnect in terminal
  3. the command exit with code 1
$ windscribe-cli disconnect; echo $?
{"tm": "2026-01-12 00:44:49.327", "lvl": "info", "mod": "cli", "msg": "=== Started ==="}
{"tm": "2026-01-12 00:44:49.327", "lvl": "info", "mod": "cli", "msg": "OS Version: \"MacOS Version 15.6.1 (Build 24G90)\""}
{"tm": "2026-01-12 00:44:49.327", "lvl": "debug", "mod": "cli", "msg": "CLI pid:  13128"}
{"tm": "2026-01-12 00:44:49.369", "lvl": "debug", "mod": "cli", "msg": "Connected to app"}
{"tm": "2026-01-12 00:44:49.370", "lvl": "info", "mod": "cli", "msg": "\"Already disconnected\""}
Already disconnected
1

Returning an error causes issues when scripting.

Expected behavior

Exit with code 0 representing success. The desired state is already achieved before the command so there's no need to return an error.

Metadata

Metadata

Assignees

No one assigned

    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