Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows wrong output #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

w6rsty
Copy link

@w6rsty w6rsty commented Sep 5, 2024

Due to the fact that netsh output is based on the system's language settings, simply using "completed successfully" to check the result will not work in other languages

if !String::from_utf8_lossy(&output.stdout)
.as_ref()
.contains("completed successfully")

To address this issue while keeping the solution simple, I use the user-provided ssid to match the output of
netsh wlan show interfaces

I've also added a check to see if the system is already connected to the specified WLAN

1.Fix error when enter a wrong password but output is connected
2. Add check for already connected ssid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant