mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-10 11:23:32 +08:00
Merge pull request #963 from affaan-m/fix/install-show-help-on-error
fix(installer): show help text on error and document --profile full
This commit is contained in:
10
README.md
10
README.md
@@ -180,6 +180,11 @@ cd everything-claude-code
|
|||||||
npm install # or: pnpm install | yarn install | bun install
|
npm install # or: pnpm install | yarn install | bun install
|
||||||
|
|
||||||
# macOS/Linux
|
# macOS/Linux
|
||||||
|
|
||||||
|
# Recommended: install everything (full profile)
|
||||||
|
./install.sh --profile full
|
||||||
|
|
||||||
|
# Or install for specific languages only
|
||||||
./install.sh typescript # or python or golang or swift or php
|
./install.sh typescript # or python or golang or swift or php
|
||||||
# ./install.sh typescript python golang swift php
|
# ./install.sh typescript python golang swift php
|
||||||
# ./install.sh --target cursor typescript
|
# ./install.sh --target cursor typescript
|
||||||
@@ -188,6 +193,11 @@ npm install # or: pnpm install | yarn install | bun install
|
|||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# Windows PowerShell
|
# Windows PowerShell
|
||||||
|
|
||||||
|
# Recommended: install everything (full profile)
|
||||||
|
.\install.ps1 --profile full
|
||||||
|
|
||||||
|
# Or install for specific languages only
|
||||||
.\install.ps1 typescript # or python or golang or swift or php
|
.\install.ps1 typescript # or python or golang or swift or php
|
||||||
# .\install.ps1 typescript python golang swift php
|
# .\install.ps1 typescript python golang swift php
|
||||||
# .\install.ps1 --target cursor typescript
|
# .\install.ps1 --target cursor typescript
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ const {
|
|||||||
parseInstallArgs,
|
parseInstallArgs,
|
||||||
} = require('./lib/install/request');
|
} = require('./lib/install/request');
|
||||||
|
|
||||||
function showHelp(exitCode = 0) {
|
function getHelpText() {
|
||||||
const languages = listLegacyCompatibilityLanguages();
|
const languages = listLegacyCompatibilityLanguages();
|
||||||
|
|
||||||
console.log(`
|
return `
|
||||||
Usage: install.sh [--target <${LEGACY_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] <language> [<language> ...]
|
Usage: install.sh [--target <${LEGACY_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] <language> [<language> ...]
|
||||||
install.sh [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] --profile <name> [--with <component>]... [--without <component>]...
|
install.sh [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] --profile <name> [--with <component>]... [--without <component>]...
|
||||||
install.sh [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] --modules <id,id,...> [--with <component>]... [--without <component>]...
|
install.sh [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] --modules <id,id,...> [--with <component>]... [--without <component>]...
|
||||||
@@ -44,8 +44,11 @@ Options:
|
|||||||
|
|
||||||
Available languages:
|
Available languages:
|
||||||
${languages.map(language => ` - ${language}`).join('\n')}
|
${languages.map(language => ` - ${language}`).join('\n')}
|
||||||
`);
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function showHelp(exitCode = 0) {
|
||||||
|
console.log(getHelpText());
|
||||||
process.exit(exitCode);
|
process.exit(exitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +142,7 @@ function main() {
|
|||||||
printHumanPlan(result, false);
|
printHumanPlan(result, false);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Error: ${error.message}`);
|
process.stderr.write(`Error: ${error.message}${getHelpText()}`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user