Skip to content

Commit 157c94c

Browse files
author
strausr
committed
fix: headless mode assertions
1 parent 64ed089 commit 157c94c

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The CLI will guide you through:
5454
For CI/CD pipelines, scripts, or automated workflows, pass `--headless` along with all options as flags to skip the interactive prompts:
5555

5656
```bash
57-
npx create-cloudinary-react -- --headless \
57+
npx create-cloudinary-react --headless \
5858
--cloudName your-cloud-name \
5959
--projectName my-app
6060
```
@@ -72,7 +72,7 @@ npx create-cloudinary-react -- --headless \
7272
| `--startDev` | boolean | `false` | Start the dev server after install |
7373
| `--packageManager` | string | *(auto-detected)* | `npm`, `pnpm`, `yarn`, or `bun` |
7474

75-
> **Note:** If a flag value starts with a dash, use `--flag=value` syntax (e.g. `--cloudName=-myvalue`). Shell variables should be quoted: `--cloudName "$CLOUD_NAME"`.
75+
> **Note:** Shell variables should be quoted to prevent unexpected expansion: `--cloudName "$CLOUD_NAME"`.
7676
7777
## 🛠️ What's Included
7878

‎cli.js‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,14 @@ async function main() {
107107
}));
108108
} catch (e) {
109109
console.error(chalk.red(`Error: ${e.message}`));
110-
console.error(chalk.gray('Tip: If a flag value starts with a dash, use --flag=value syntax (e.g., --cloudName=-myvalue)'));
111110
process.exit(1);
112111
}
113112

114113
Object.assign(answers, values);
115114

116115
const errors = [];
117116

118-
if (!values.projectName) {
119-
errors.push('--projectName is required');
120-
} else if (!isValidProjectName(values.projectName)) {
117+
if (!isValidProjectName(values.projectName)) {
121118
errors.push('--projectName can only contain letters, numbers, hyphens, and underscores');
122119
} else if (existsSync(values.projectName)) {
123120
errors.push(`Directory "${values.projectName}" already exists. Please choose a different name.`);

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)