mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-02 22:02:13 +08:00
fix: add Windows compatibility for make dev/start commands (#1297)
* fix: add Windows compatibility for make dev/start commands On Windows with MinGW/Git Bash, the Makefile's direct shell script execution fails with 'CreateProcess(NULL, env bash ...)' error. This fix: - Detects Windows via $(OS) == Windows_NT - Uses explicit bash invocation on Windows - Falls back to direct execution on Unix Users need Git Bash installed (comes with Git for Windows). Fixes #1288 Related #1278 * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
16
Makefile
16
Makefile
@@ -3,6 +3,12 @@
|
||||
.PHONY: help config config-upgrade check install dev dev-daemon start stop up down clean docker-init docker-start docker-stop docker-logs docker-logs-frontend docker-logs-gateway
|
||||
|
||||
PYTHON ?= python
|
||||
BASH ?= bash
|
||||
|
||||
# Detect OS for Windows compatibility
|
||||
ifeq ($(OS),Windows_NT)
|
||||
SHELL := cmd.exe
|
||||
endif
|
||||
|
||||
help:
|
||||
@echo "DeerFlow Development Commands:"
|
||||
@@ -90,11 +96,21 @@ setup-sandbox:
|
||||
|
||||
# Start all services in development mode (with hot-reloading)
|
||||
dev:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
@echo "Detected Windows - using Git Bash..."
|
||||
@$(BASH) ./scripts/serve.sh --dev
|
||||
else
|
||||
@./scripts/serve.sh --dev
|
||||
endif
|
||||
|
||||
# Start all services in production mode (with optimizations)
|
||||
start:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
@echo "Detected Windows - using Git Bash..."
|
||||
@$(BASH) ./scripts/serve.sh --prod
|
||||
else
|
||||
@./scripts/serve.sh --prod
|
||||
endif
|
||||
|
||||
# Start all services in daemon mode (background)
|
||||
dev-daemon:
|
||||
|
||||
Reference in New Issue
Block a user