electron / build-tools

The GN scripts to use for Electron dev-flows
MIT License
260 stars 77 forks source link

`e sync` command fails due to git root mistmatch (Windows 10) #588

Open andrewsml opened 5 months ago

andrewsml commented 5 months ago

this happen by running e sync command. it compares two pathes and the only difference is that C: drive is in uppercase

________ running 'python3 build/config/siso/configure_siso.py --rbe_instance projects/rbe-chrome-untrusted/instances/default_instance' in 'c:\workspace\electron_release'
gclient(1967) _WriteFileContents:Writing to file c:\workspace\electron_release\.gclient_previous_sync_commits
ERROR Expected git root to be c:\workspace\electron_release\src\electron but found C:\workspace\electron_release\src\electron

Operating System

Windows 10 22H2

Expected Behavior

e sync succeeds

MarshallOfSound commented 5 months ago

I assume we need some kind of path.normalize around cwd as well here --> https://github.com/electron/build-tools/blob/6cfcc75eac849ef6eec50d99d3da604e82ecc6f8/src/e-sync.js#L21-L23

You can try fiddling with that part of build-tools locally and submit a PR if you can make it work? Build tools is working fine on my windows machine so it's probably something specific to your set up? File system, node version, git version, etc.

andrewsml commented 5 months ago

@MarshallOfSound , alright. I made a pull request, thanks