chore: refuse native Windows, point to WSL2 setup guide (#467)

This commit is contained in:
ezl-keygraph authored and GitHub committed 2026-09-21 18:16:22 +05:30
1 parent 22b093aac5
commit 327c10fd90
4 files changed
+20 -13

No files matched your search

+6 -9
View File
@@ -96,15 +96,12 @@ function loadTOML(): TOMLConfig | null {
if (!fs.existsSync(configPath)) return null;
// Config contains secrets — refuse to read if group or others have any access.
// Skip on Windows where POSIX permissions are not supported.
if (process.platform !== 'win32') {
const mode = fs.statSync(configPath).mode;
if (mode & 0o077) {
const actual = (mode & 0o777).toString(8).padStart(3, '0');
fail(
`Your config file is readable by other users on this machine (${actual}). Lock it down: chmod 600 ${configPath}`,
);
}
const mode = fs.statSync(configPath).mode;
if (mode & 0o077) {
const actual = (mode & 0o777).toString(8).padStart(3, '0');
fail(
`Your config file is readable by other users on this machine (${actual}). Lock it down: chmod 600 ${configPath}`,
);
}
try {