Add a unit test for shouldBypassSafeChain

This commit is contained in:
Uriel Corfa 2025-12-11 13:58:46 +01:00
parent 64d87ae1e1
commit db2c272aea
No known key found for this signature in database
2 changed files with 32 additions and 13 deletions

View file

@ -16,7 +16,7 @@ import ini from "ini";
* @param {string[]} args - The arguments
* @returns {boolean}
*/
function shouldBypassSafeChain(command, args) {
export function shouldBypassSafeChain(command, args) {
if (command === PYTHON_COMMAND || command === PYTHON3_COMMAND) {
// Check if args start with -m pip
if (args.length >= 2 && args[0] === "-m" && (args[1] === PIP_COMMAND || args[1] === PIP3_COMMAND)) {