Skip to content

Flutter engine git push is broken on Windows #108122

@loic-sharma

Description

@loic-sharma

Problem

This appears to be a regression introduced by flutter/engine#34374. /cc @mtolmacs

The pre-commit git hook does not find depot_tool's python3.bat file, causing git push to fail on Windows unless python3 is installed elsewhere. You may not run into this issue if you've installed the "real" python3 SDK on your machine.

Error:

> git push -u origin HEAD
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
error: failed to push some refs to 'github.com:loic-sharma/flutter-engine.git'

Solutions

In the short-term, we will revert the PR that caused this regression. In the long-term, potential solutions include:

  1. Create a separate pre-push git hook entry point for Windows, or...
  2. Rewrite the pre-push git hook entry point to use pure bash instead of python3, or...
  3. Add a step to Flutter engine's setup guide to add /path/to/depot_tools/python-bin to your path

I'm leaning towards option 1 as that's the prior art.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.platform-windowsBuilding on or for Windows specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions