From e470e9d4c5f409ede3e7f85356f75465675bad35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=90=E7=B2=92=20Yanli?= Date: Mon, 11 May 2026 21:48:57 +0800 Subject: [PATCH] fix dify-agent make project directory --- dify-agent/Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dify-agent/Makefile b/dify-agent/Makefile index de5bcbe095..4f0e91d116 100644 --- a/dify-agent/Makefile +++ b/dify-agent/Makefile @@ -1,5 +1,7 @@ .DEFAULT_GOAL := help +PROJECT_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) + .PHONY: help check fix typecheck test update-examples docs docs-serve help: @@ -13,23 +15,23 @@ help: @echo " make docs-serve - Serve MkDocs documentation locally" check: - @uv run --project . python -m ruff check . + @uv --directory "$(PROJECT_DIR)" run --project . python -m ruff check . fix: - @uv run --project . python -m ruff format . - @uv run --project . python -m ruff check --fix . + @uv --directory "$(PROJECT_DIR)" run --project . python -m ruff format . + @uv --directory "$(PROJECT_DIR)" run --project . python -m ruff check --fix . typecheck: - @uv run --project . python -m basedpyright --level error src examples tests + @uv --directory "$(PROJECT_DIR)" run --project . basedpyright --level error src examples tests test: - @uv run --project . python -m pytest tests + @uv --directory "$(PROJECT_DIR)" run --project . python -m pytest tests update-examples: - @uv run --project . python -m pytest --update-examples tests/docs/test_examples.py + @uv --directory "$(PROJECT_DIR)" run --project . python -m pytest --update-examples tests/docs/test_examples.py docs: - @uv run --project . --group docs python -m mkdocs build --no-strict + @uv --directory "$(PROJECT_DIR)" run --project . --group docs python -m mkdocs build --no-strict docs-serve: - @uv run --project . --group docs python -m mkdocs serve --no-strict + @uv --directory "$(PROJECT_DIR)" run --project . --group docs python -m mkdocs serve --no-strict