fix(windows): add Windows compatibility for env vars and glob patterns #1230
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Title: Fix Windows Compatibility: Environment Variables & Glob Patterns
Pull Request Description:
Problem Statement
Opencast Studio does not run correctly on Windows due to two main issues:
Environment Variables Not Windows-Compatible
npm start
andnpm run build
commands use Linux/macOS syntax for setting environment variables (VAR=value
), which fails on Windows.'COMMIT_SHA' is not recognized as an internal or external command, operable program or batch file.
Glob Patterns Not Expanding on Windows
@(roboto-flex|vazirmatn)
) on Windows, treating them as literal directory names instead of expanding them.Solution
Issue 1: Add Windows-Compatible Start Command
winstart
) inpackage.json
:Issue 2: Replace Glob Patterns with Explicit Paths
webpack.config.ts
to use explicit file paths instead of glob patterns:Testing
Successfully tested across multiple environments:
✔ Windows Command Prompt
✔ Windows PowerShell
✔ GitBash on Windows
✔ Windows Subsystem for Linux 2 (WSL2)
Checklist (as per CONTRIBUTING.md)
✅ Pull request closes issue (not applicable).
✅ Clear and concise PR title and description.
✅ Relevant documentation updates included.
✅ Fix validated through manual testing on multiple Windows environments.
✅ Clean commit history.
Additional Notes
npm run winstart
.