Skip to content

Commit

Permalink
fix: wifi connect issue fix for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
z00303mf committed Jun 28, 2020
1 parent f607a51 commit 8d992a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/windows-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var scan = require('./windows-scan');

function execCommand(cmd, params) {
return new Promise(function(resolve, reject) {
execFile(cmd, params, { env }, function(err, stdout, stderr) {
execFile(cmd, params, { env, shell: true }, function(err, stdout, stderr) {
if (err) {
// Add command output to error, so it's easier to handle
err.stdout = stdout;
Expand Down Expand Up @@ -44,7 +44,7 @@ function connectToWifi(config, ap, callback) {
]);
})
.then(function() {
var cmd = 'cmd';
var cmd = 'netsh';
var params = [
'wlan',
'connect',
Expand Down

0 comments on commit 8d992a6

Please sign in to comment.