Skip to content

Added make.ps1 to emulate make commands on Windows#599

Open
mitchcapper wants to merge 1 commit intoOpenBMB:mainfrom
mitchcapper:windows_make_ps1
Open

Added make.ps1 to emulate make commands on Windows#599
mitchcapper wants to merge 1 commit intoOpenBMB:mainfrom
mitchcapper:windows_make_ps1

Conversation

@mitchcapper
Copy link
Copy Markdown

Technically this should work on all platforms with powershell but not sure why you would use it elsewhere.

Running ./make.ps1 dev properly responds to control+c (stopping both).

@huatl98
Copy link
Copy Markdown
Collaborator

huatl98 commented Apr 3, 2026

Technically this should work on all platforms with powershell but not sure why you would use it elsewhere.

Running ./make.ps1 dev properly responds to control+c (stopping both).

The main issue is that make.ps1 does not propagate native command failures correctly. Right now commands like uv run pytest -v or uvx ruff check . can fail without causing the script itself to exit non-zero, and check-backend may continue to run lint even after tests fail. I’d suggest wrapping native command execution in a helper that checks $LASTEXITCODE and immediately exits on failure.

Also, the default branch should return a non-zero exit code for unknown commands. Printing help is fine, but it should still exit 1; otherwise typos can be reported as success.

@mitchcapper
Copy link
Copy Markdown
Author

Good point. I figured it was more a user console tool but should do so. all fixed.

@huatl98
Copy link
Copy Markdown
Collaborator

huatl98 commented Apr 4, 2026

Good point. I figured it was more a user console tool but should do so. all fixed.

The previous two issues look fixed, thanks. One similar issue still remains: Start-Client calls npm run dev --prefix frontend directly, not through Exec, so ./make.ps1 client may still return 0 even if npm fails.
I think it should probably be:
Exec { npm run dev --prefix frontend }

@mitchcapper
Copy link
Copy Markdown
Author

Yeah sorry missed that critical one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants