mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix some border cases
This commit is contained in:
parent
1b82aeb6b0
commit
1fdb15a392
9 changed files with 685 additions and 46 deletions
|
|
@ -1,11 +1,13 @@
|
|||
/**
|
||||
* Pip command constants
|
||||
*
|
||||
* Note: Unlike npm, pip does not support command aliases or abbreviations.
|
||||
* Commands must be spelled out fully (e.g., "install", not "i" or "add").
|
||||
*/
|
||||
export const pipInstallCommand = "install";
|
||||
export const pipDownloadCommand = "download";
|
||||
export const pipWheelCommand = "wheel";
|
||||
export const pipUninstallCommand = "uninstall";
|
||||
export const pipListCommand = "list";
|
||||
export const pipShowCommand = "show";
|
||||
export const pipFreeze = "freeze";
|
||||
|
||||
/**
|
||||
* Gets the pip command from the arguments array
|
||||
|
|
@ -27,3 +29,13 @@ export function getPipCommandForArgs(args) {
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the arguments contain the --dry-run flag
|
||||
*
|
||||
* @param {string[]} args - Command line arguments
|
||||
* @returns {boolean} True if --dry-run is present
|
||||
*/
|
||||
export function hasDryRunArg(args) {
|
||||
return args.some((arg) => arg === "--dry-run");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue