mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
PR comments
This commit is contained in:
parent
ce1a2a6ca6
commit
dc6f16a034
3 changed files with 8 additions and 30 deletions
|
|
@ -1,18 +1,6 @@
|
||||||
# Downloads and installs safe-chain for Windows
|
# Downloads and installs safe-chain for Windows
|
||||||
#
|
#
|
||||||
# Usage examples:
|
# Usage with "iex (iwr {url} -UseBasicParsing)" --> See README.md
|
||||||
#
|
|
||||||
# Default (JavaScript packages only):
|
|
||||||
# iex (iwr "https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1" -UseBasicParsing)
|
|
||||||
#
|
|
||||||
# CI setup (JavaScript packages only):
|
|
||||||
# iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -ci"
|
|
||||||
#
|
|
||||||
# Include Python packages:
|
|
||||||
# iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -includepython"
|
|
||||||
#
|
|
||||||
# CI setup with Python packages:
|
|
||||||
# iex "& { $(iwr 'https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.ps1' -UseBasicParsing) } -ci -includepython"
|
|
||||||
|
|
||||||
param(
|
param(
|
||||||
[switch]$ci,
|
[switch]$ci,
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,7 @@
|
||||||
|
|
||||||
# Downloads and installs safe-chain, depending on the operating system and architecture
|
# Downloads and installs safe-chain, depending on the operating system and architecture
|
||||||
#
|
#
|
||||||
# Usage examples:
|
# Usage with "curl -fsSL {url} | sh" --> See README.md
|
||||||
#
|
|
||||||
# Default (JavaScript packages only):
|
|
||||||
# curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh
|
|
||||||
# wget -qO- https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh
|
|
||||||
#
|
|
||||||
# CI setup (JavaScript packages only):
|
|
||||||
# curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci
|
|
||||||
# wget -qO- https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci
|
|
||||||
#
|
|
||||||
# Include Python packages:
|
|
||||||
# curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --include-python
|
|
||||||
# wget -qO- https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --include-python
|
|
||||||
#
|
|
||||||
# CI setup with Python packages:
|
|
||||||
# curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci --include-python
|
|
||||||
# wget -qO- https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci --include-python
|
|
||||||
|
|
||||||
set -e # Exit on error
|
set -e # Exit on error
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,12 @@ async function getVersion() {
|
||||||
* @param {import("../src/shell-integration/helpers.js").AikidoTool} tool
|
* @param {import("../src/shell-integration/helpers.js").AikidoTool} tool
|
||||||
*/
|
*/
|
||||||
async function executePip(tool) {
|
async function executePip(tool) {
|
||||||
|
// Scanners for pip / pip3 / python / python3 use a slightly different approach:
|
||||||
|
// - They all use the same PIP_PACKAGE_MANAGER internally, but need some setup to be able to do so
|
||||||
|
// - It needs to set which tool to run (pip / pip3 / python / python3)
|
||||||
|
// - For python and python3, the -m pip/pip3 args are removed and later added again by the package manager
|
||||||
|
// - Python / python3 skips safe-chain if not being run with -m pip or -m pip3
|
||||||
|
|
||||||
let args = process.argv.slice(3);
|
let args = process.argv.slice(3);
|
||||||
setEcoSystem(tool.ecoSystem);
|
setEcoSystem(tool.ecoSystem);
|
||||||
initializePackageManager(PIP_PACKAGE_MANAGER);
|
initializePackageManager(PIP_PACKAGE_MANAGER);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue