mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Print warning if deprecated --include-python flag is given
This commit is contained in:
parent
6beb962282
commit
037a83e1ff
5 changed files with 109 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { ui } from "../environment/userInteraction.js";
|
||||
|
||||
/**
|
||||
* @type {{loggingLevel: string | undefined, skipMinimumPackageAge: boolean | undefined, minimumPackageAgeHours: string | undefined}}
|
||||
*/
|
||||
|
|
@ -33,7 +35,7 @@ export function initializeCliArguments(args) {
|
|||
setLoggingLevel(safeChainArgs);
|
||||
setSkipMinimumPackageAge(safeChainArgs);
|
||||
setMinimumPackageAgeHours(safeChainArgs);
|
||||
|
||||
checkDeprecatedPythonFlag(args);
|
||||
return remainingArgs;
|
||||
}
|
||||
|
||||
|
|
@ -120,3 +122,18 @@ function hasFlagArg(args, flagName) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Emits a deprecation warning for legacy --include-python flag
|
||||
*
|
||||
* @param {string[]} args
|
||||
* @returns {void}
|
||||
*/
|
||||
export function checkDeprecatedPythonFlag(args) {
|
||||
if (!Array.isArray(args)) return;
|
||||
if (args.includes("--include-python")) {
|
||||
ui.writeWarning(
|
||||
"--include-python is deprecated and ignored. Python tooling is included by default."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue