Describe the bug.
When using the asyncapi diff command with the --output flag in version @asyncapi/cli@3.1.1, the output is printed to the terminal but not written to the specified file. This occurs even when using --no-error to suppress breaking change errors.
There is no error message, and the command appears to run successfully, but the output file is not created or modified.
Expected behavior
The --output flag should cause the diff result to be written to the specified file. If the file does not exist, it should be created. If it does exist, it should be overwritten or updated accordingly.
Screenshots

How to Reproduce
-
Create two AsyncAPI files with small differences (e.g., asyncapi-1.yaml and asyncapi-2.yaml).
-
Run the following command: asyncapi diff asyncapi-1.yaml asyncapi-2.yaml -f yaml --output output.yml
Observe that:
- The diff is printed to the console.
- No output.yml file is created or updated.
🖥️ Device Information [optional]
AsyncAPI CLI: @asyncapi/cli@3.1.1
Node.js: v22.15.0
OS: Ubuntu 24.04
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None
Describe the bug.
When using the asyncapi diff command with the --output flag in version @asyncapi/cli@3.1.1, the output is printed to the terminal but not written to the specified file. This occurs even when using --no-error to suppress breaking change errors.
There is no error message, and the command appears to run successfully, but the output file is not created or modified.
Expected behavior
The --output flag should cause the diff result to be written to the specified file. If the file does not exist, it should be created. If it does exist, it should be overwritten or updated accordingly.
Screenshots
How to Reproduce
Create two AsyncAPI files with small differences (e.g., asyncapi-1.yaml and asyncapi-2.yaml).
Run the following command:
asyncapi diff asyncapi-1.yaml asyncapi-2.yaml -f yaml --output output.ymlObserve that:
🖥️ Device Information [optional]
AsyncAPI CLI: @asyncapi/cli@3.1.1
Node.js: v22.15.0
OS: Ubuntu 24.04
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None