mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-10-06 00:06:53 +02:00
chore: refuse native Windows, point to WSL2 setup guide (#467)
This commit is contained in:
1 parent
22b093aac5
commit
327c10fd90
4 files changed
+20
-13
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user