mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-10-08 01:01:10 +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
@@ -61,6 +61,18 @@ function blockSudo(): void {
|
||||
);
|
||||
}
|
||||
|
||||
/** Refuse to run on native Windows. WSL2 reports `linux`, so it is unaffected. */
|
||||
function blockNativeWindows(): void {
|
||||
if (process.platform !== 'win32') return;
|
||||
|
||||
failWith(
|
||||
'CLI_PRECONDITION_FAILED',
|
||||
'Shannon does not run on native Windows.',
|
||||
'Run Shannon inside WSL2. Setup instructions:',
|
||||
'https://github.com/KeygraphHQ/shannon/blob/main/docs/platforms.md',
|
||||
);
|
||||
}
|
||||
|
||||
/** Commands whose `--json` output contract extends to failures. */
|
||||
const JSON_CAPABLE_COMMANDS = new Set(['status', 'scans', 'version', '--version', '-v']);
|
||||
|
||||
@@ -262,6 +274,7 @@ async function main(): Promise<void> {
|
||||
enableJsonErrors();
|
||||
}
|
||||
|
||||
blockNativeWindows();
|
||||
blockSudo();
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
Reference in new issue
Block a user