mirror of
https://github.com/gren-lang/compiler.git
synced 2024-10-05 21:17:51 +03:00
Crash node applications if wrong node version is detected.
This commit is contained in:
parent
be10d8ab37
commit
1064270e63
@ -19,6 +19,10 @@ sandwich moduleName javascript =
|
||||
let name = Name.toBuilder moduleName
|
||||
in [r|#!/usr/bin/env node
|
||||
|
||||
if (parseInt(process.versions.node.split('.')[0]) < 20) {
|
||||
throw new Error("This program requires Node v20 or later to run")
|
||||
}
|
||||
|
||||
try {
|
||||
|]
|
||||
<> javascript
|
||||
|
Loading…
Reference in New Issue
Block a user