mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add feature flag in setup for python support.
This commit is contained in:
parent
6b208a8730
commit
c6bcd6f646
13 changed files with 413 additions and 100 deletions
|
|
@ -6,6 +6,7 @@ import { ui } from "../src/environment/userInteraction.js";
|
|||
import { setup } from "../src/shell-integration/setup.js";
|
||||
import { teardown } from "../src/shell-integration/teardown.js";
|
||||
import { setupCi } from "../src/shell-integration/setup-ci.js";
|
||||
import { initializeCliArguments } from "../src/config/cliArguments.js";
|
||||
|
||||
if (process.argv.length < 3) {
|
||||
ui.writeError("No command provided. Please provide a command to execute.");
|
||||
|
|
@ -14,6 +15,8 @@ if (process.argv.length < 3) {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
initializeCliArguments(process.argv);
|
||||
|
||||
const command = process.argv[2];
|
||||
|
||||
if (command === "help" || command === "--help" || command === "-h") {
|
||||
|
|
@ -56,6 +59,11 @@ function writeHelp() {
|
|||
"safe-chain setup"
|
||||
)}: This will setup your shell to wrap safe-chain around npm, npx, yarn, pnpm, pnpx, bun, bunx, pip and pip3.`
|
||||
);
|
||||
ui.writeInformation(
|
||||
` ${chalk.yellow(
|
||||
"--include-python"
|
||||
)}: Experimental: include Python package managers (pip, pip3) in the setup.`
|
||||
);
|
||||
ui.writeInformation(
|
||||
`- ${chalk.cyan(
|
||||
"safe-chain teardown"
|
||||
|
|
@ -67,9 +75,14 @@ function writeHelp() {
|
|||
)}: This will setup safe-chain for CI environments by creating shims and modifying the PATH.`
|
||||
);
|
||||
ui.writeInformation(
|
||||
`- ${chalk.cyan(
|
||||
"safe-chain --version"
|
||||
)} (or ${chalk.cyan("-v")}): Display the current version of safe-chain.`
|
||||
` ${chalk.yellow(
|
||||
"--include-python"
|
||||
)}: Experimental: include Python package managers (pip, pip3) in the setup.`
|
||||
);
|
||||
ui.writeInformation(
|
||||
`- ${chalk.cyan("safe-chain --version")} (or ${chalk.cyan(
|
||||
"-v"
|
||||
)}): Display the current version of safe-chain.`
|
||||
);
|
||||
ui.emptyLine();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue