@reliverse/rempts 1.7.18 → 1.7.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -676,20 +676,21 @@ async function runCommandWithArgs(command, argv, parserOptions, returnCtx) {
|
|
|
676
676
|
else throw new Error(`Missing required argument: --${key}`);
|
|
677
677
|
}
|
|
678
678
|
if (def.dependencies && Array.isArray(def.dependencies)) {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
679
|
+
const missingDeps = def.dependencies.filter(
|
|
680
|
+
(dependency) => !(parsed[dependency] ?? defaultMap[dependency])
|
|
681
|
+
);
|
|
682
|
+
if (missingDeps.length > 0) {
|
|
683
|
+
const depsList = missingDeps.map((d) => `--${d}`).join(", ");
|
|
684
|
+
await showUsage(command, parserOptions);
|
|
685
|
+
relinka(
|
|
686
|
+
"error",
|
|
687
|
+
`Argument --${key} can only be used when ${depsList} ${missingDeps.length === 1 ? "is" : "are"} set`
|
|
688
|
+
);
|
|
689
|
+
if (autoExit) process.exit(1);
|
|
690
|
+
else
|
|
691
|
+
throw new Error(
|
|
692
|
+
`Argument --${key} can only be used when ${depsList} ${missingDeps.length === 1 ? "is" : "are"} set`
|
|
686
693
|
);
|
|
687
|
-
if (autoExit) process.exit(1);
|
|
688
|
-
else
|
|
689
|
-
throw new Error(
|
|
690
|
-
`Argument --${key} requires --${dependency} to be set`
|
|
691
|
-
);
|
|
692
|
-
}
|
|
693
694
|
}
|
|
694
695
|
}
|
|
695
696
|
try {
|
|
@@ -897,13 +898,14 @@ export async function runCmd(command, argv = [], parserOptions = {}) {
|
|
|
897
898
|
throw new Error(`Missing required argument: --${key}`);
|
|
898
899
|
}
|
|
899
900
|
if (def.dependencies && Array.isArray(def.dependencies)) {
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
901
|
+
const missingDeps = def.dependencies.filter(
|
|
902
|
+
(dependency) => !(parsed[dependency] ?? defaultMap[dependency])
|
|
903
|
+
);
|
|
904
|
+
if (missingDeps.length > 0) {
|
|
905
|
+
const depsList = missingDeps.map((d) => `--${d}`).join(", ");
|
|
906
|
+
throw new Error(
|
|
907
|
+
`Argument --${key} can only be used when ${depsList} ${missingDeps.length === 1 ? "is" : "are"} set`
|
|
908
|
+
);
|
|
907
909
|
}
|
|
908
910
|
}
|
|
909
911
|
try {
|