Skip to content

Commit f731713

Browse files
authored
fix(oclif): disable engine warning (#1333)
| 🚥 Resolves #1331 | | :------------------- | ## 🧰 Changes as first discovered in #1331, [`@oclif/core` uses **_its own_** node engine requirements and emits a warning](https://github.com/oclif/core/blob/70d3f192862a5adb548cbda68c6ee1ca8f724110/src/index.ts#L12-L27) if its node version requirements aren't met: they require v18 or later but we require v20 or later, so the warning looks like this (which is wrong): ``` (node:4619) Warning: Node version must be >=18.0.0 to use this CLI. Current node version: 14.20.0 ``` due to this being misleading, we're going to disable this warning entirely. i don't **_think_** we need to emit warnings for mismatched versions of node.js (since the warning is already emitted when users install this CLI via `npm`) but i'm open to reevaluating that. ## 🧬 QA & Testing confirmed that using a version of node.js less than 18 no longer emits this warning.
1 parent 7492718 commit f731713

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/run.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
import stringArgv from 'string-argv';
44

55
async function main() {
6+
/**
7+
* Disables the oclif engine warning. For some reason the versions that are flagged are totally separate from our engines requirements.
8+
*
9+
* @see {@link https://github.com/oclif/core/blob/70d3f192862a5adb548cbda68c6ee1ca8f724110/src/index.ts#L12}
10+
*/
11+
process.env.OCLIF_DISABLE_ENGINE_WARNING = 'true';
12+
613
const { execute } = await import('@oclif/core');
714
const opts = { dir: import.meta.url };
815
if (process.env.INPUT_RDME) {

0 commit comments

Comments
 (0)