diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 947f642..f9e089d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: name: tests strategy: matrix: - os: [ubuntu-latest, macos-latest] # TODO: add windows-latest + os: [ubuntu-latest, macos-latest, windows-latest] python: ['3.8', '3.9', '3.10', '3.11', '3.12'] fail-fast: false runs-on: ${{ matrix.os }} diff --git a/src/flask_assets.py b/src/flask_assets.py index 026f987..22d78c5 100644 --- a/src/flask_assets.py +++ b/src/flask_assets.py @@ -275,6 +275,9 @@ def convert_item_to_flask_url(self, ctx, item, filepath=None): else: filename = rel_path + # Windows compatibility + filename = filename.replace("\\", "/") + flask_ctx = None if not has_request_context(): flask_ctx = ctx.environment._app.test_request_context()