-
-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug.
Summary
The startNewVersion npm script fails completely on Windows because it uses Unix-specific environment variable syntax that Windows CMD doesn't understand.
Current Problematic Code
File: package.json (line 13)
```json
`"startNewVersion": "newVersion=$npm_config_new_version node scripts/add-new-version.js"`
Problem
- newVersion=$npm_config_new_version is Unix shell syntax
- Windows CMD doesn't recognize variable=value format
- Results in: 'newVersion' is not recognized as an internal or external command
Error Output
npm run startNewVersion
'newVersion' is not recognized as an internal or external command,
operable program or batch file.
Expected behavior
Steps to Reproduce:
- Use a Windows machine (Windows 10/11)
- Clone the repository: git clone https://github.com/asyncapi/spec-json-schemas.git
- Navigate to directory: cd spec-json-schemas
- Install dependencies: npm install
- Try to run the script: npm run startNewVersion --new-version=2.7.0
- Observe the error
Alternative reproduction:
- Simply run: npm run startNewVersion
- Same error occurs immediately
What happens:
Windows CMD tries to parse the Unix syntax and fails at newVersion= because Windows doesn't understand Unix variable assignment syntax.
Screenshots
How to Reproduce
Steps to Reproduce
- Use a Windows machine (Windows 10/11)
- Clone the repository:
git clone https://github.com/asyncapi/spec-json-schemas.git - Navigate to directory:
cd spec-json-schemas - Install dependencies:
npm install - Try to run the script:
npm run startNewVersion --new-version=2.7.0 - Observe the error
Alternative reproduction (without version flag):
- Simply run:
npm run startNewVersion - Same error occurs immediately
What happens:
- Windows CMD tries to parse:
newVersion=$npm_config_new_version node scripts/add-new-version.js - Fails at
newVersion=because Windows doesn't understand Unix variable assignment syntax - Script never gets executed
🖥️ Device Information [optional]
- Operating System:
- Browser:
- Browser Version:
👀 Have you checked for similar open issues?
- I checked and didn't find similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working