mirror of
https://github.com/HolographicHat/Yae.git
synced 2025-12-15 02:48:12 +08:00
no hard code loc
This commit is contained in:
2
utils.js
2
utils.js
@@ -241,7 +241,7 @@ let hostsContent = undefined
|
||||
|
||||
const setupHost = (restore = false) => {
|
||||
if (restore && hostsContent === undefined) return
|
||||
const path = "C:\\Windows\\System32\\drivers\\etc\\hosts"
|
||||
const path = `${process.env.windir}\\System32\\drivers\\etc\\hosts`
|
||||
if (!fs.existsSync(path)) {
|
||||
fs.writeFileSync(path, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user