Skip to content

Commit 87d883e

Browse files
authored
Merge pull request anomalyco#963 from affaan-m/fix/install-show-help-on-error
fix(installer): show help text on error and document --profile full
2 parents 70a96bd + 652f87c commit 87d883e

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ cd everything-claude-code
180180
npm install # or: pnpm install | yarn install | bun install
181181

182182
# macOS/Linux
183+
184+
# Recommended: install everything (full profile)
185+
./install.sh --profile full
186+
187+
# Or install for specific languages only
183188
./install.sh typescript # or python or golang or swift or php
184189
# ./install.sh typescript python golang swift php
185190
# ./install.sh --target cursor typescript
@@ -188,6 +193,11 @@ npm install # or: pnpm install | yarn install | bun install
188193

189194
```powershell
190195
# Windows PowerShell
196+
197+
# Recommended: install everything (full profile)
198+
.\install.ps1 --profile full
199+
200+
# Or install for specific languages only
191201
.\install.ps1 typescript # or python or golang or swift or php
192202
# .\install.ps1 typescript python golang swift php
193203
# .\install.ps1 --target cursor typescript

‎scripts/install-apply.js‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ const {
1717
parseInstallArgs,
1818
} = require('./lib/install/request');
1919

20-
function showHelp(exitCode = 0) {
20+
function getHelpText() {
2121
const languages = listLegacyCompatibilityLanguages();
2222

23-
console.log(`
23+
return `
2424
Usage: install.sh [--target <${LEGACY_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] <language> [<language> ...]
2525
install.sh [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] --profile <name> [--with <component>]... [--without <component>]...
2626
install.sh [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] --modules <id,id,...> [--with <component>]... [--without <component>]...
@@ -44,8 +44,11 @@ Options:
4444
4545
Available languages:
4646
${languages.map(language => ` - ${language}`).join('\n')}
47-
`);
47+
`;
48+
}
4849

50+
function showHelp(exitCode = 0) {
51+
console.log(getHelpText());
4952
process.exit(exitCode);
5053
}
5154

@@ -139,7 +142,7 @@ function main() {
139142
printHumanPlan(result, false);
140143
}
141144
} catch (error) {
142-
console.error(`Error: ${error.message}`);
145+
process.stderr.write(`Error: ${error.message}${getHelpText()}`);
143146
process.exit(1);
144147
}
145148
}

0 commit comments

Comments
 (0)