@wrongstack/persistence 0.316.2 → 0.317.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -302,9 +302,9 @@ async function restrictDirPermissions(dirPath, opts) {
|
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
function windowsAccountName() {
|
|
305
|
-
const username = process.env
|
|
305
|
+
const username = process.env["USERNAME"] ?? process.env["USER"];
|
|
306
306
|
if (!username || username.includes("\0")) return void 0;
|
|
307
|
-
const domain = process.env
|
|
307
|
+
const domain = process.env["USERDOMAIN"];
|
|
308
308
|
if (domain && !domain.includes("\0")) return `${domain}\\${username}`;
|
|
309
309
|
return username;
|
|
310
310
|
}
|