Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
1 changed files with 1 additions and 6 deletions
Showing only changes of commit 4ce4ac2735 - Show all commits

View File

@ -88,22 +88,17 @@ class Wifi {
console.error(err)
return _cb(err)
}
console.log(data)
parsed = parseConfig(data)
console.dir(parsed)
current = parsed.find(network => {
return network.ssid === _ssid
})
console.log(current)
if (typeof current !== 'undefined') {
data = data.replace(current.raw, _entry)
} else {
data += '\n\n' + _entry
}
console.log(data)
_entry = null
setTimeout(this._writeConfigCb, 1)
//fs.writeFile(filePath, data, 'utf8', this._writeConfigCb)
fs.writeFile(filePath, data, 'utf8', this._writeConfigCb)
}
/**
* (internal function) Invoked after config file is written,