emqx / MQTTX

A Powerful and All-in-One MQTT 5.0 client toolbox for Desktop, CLI and WebSocket.
https://mqttx.app
Apache License 2.0
3.92k stars 448 forks source link

feat(desktop): support setup cli to windows path #1715

Closed ysfscream closed 4 months ago

ysfscream commented 4 months ago

PR Checklist

If you have any questions, you can refer to the Contributing Guide

What is the current behavior?

Windows users can only run mqttx.exe manually. They should find the CLI exe file first on the system.

Issue Number

Example: None

What is the new behavior?

Add ${downloadPath}/mqttx.exe to the PATH to run mqttx.exe anywhere.

https://stackoverflow.com/questions/59560042/how-to-append-values-to-the-path-environment-variable-in-nodejs

Does this PR introduce a breaking change?

Specific Instructions

Are there any specific instructions or things that should be known prior to review?

Other information

ysfscream commented 4 months ago

Waiting for real testing on the Windows system.

ysfscream commented 4 months ago

@Red-Asuka Updating the PATH environment variable is a sensitive and dangerous operation that must be done cautiously. Therefore, we will temporarily not support using the PATH method to update the Windows CLI. I will close this PR.