From 92d6e673e79a99432146962c1fe7e8882e90e328 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 27 Apr 2022 20:26:19 +0200 Subject: [PATCH] scripts/check-docs-quality: avoid eager require of command-exists Signed-off-by: Patrik Oldsberg --- scripts/check-docs-quality.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/check-docs-quality.js b/scripts/check-docs-quality.js index 5bc2596bf0..ac9db65b40 100755 --- a/scripts/check-docs-quality.js +++ b/scripts/check-docs-quality.js @@ -15,7 +15,6 @@ */ const { spawnSync } = require('child_process'); const { resolve: resolvePath, join: joinPath } = require('path'); -const commandExists = require('command-exists'); const fs = require('fs').promises; const IGNORED = [ @@ -56,7 +55,7 @@ async function listFiles(dir = '') { // caused by the script. In CI, we want to ensure vale linter is run. async function exitIfMissingVale() { try { - await commandExists('vale'); + await require('command-exists')('vale'); } catch (e) { if (process.env.CI) { console.log(