• Wez Furlong's avatar
    fb_py_win_main.c: fix File Not Found errors on windows · b2003abb
    Wez Furlong authored
    Summary:
    This commit resolves an issue with our zipapp executables
    on Windows that meant that the only reliable way to start them was
    to use the fully path to the executable.
    
    The root cause is that the __wargv array is produced by parsing the
    process command line into an array, and if you ran `watchman-wait -h`
    __wargv[0] would have `watchman-wait` rather than the fully qualified
    path to the executable that the zipapp plumbing requires.
    
    The fix is to ask the system for the fully qualified path and ensure that
    that gets set as both argv[0] AND argv[1].
    
    Reviewed By: xavierd
    
    Differential Revision: D21190350
    
    fbshipit-source-id: eeb95084592d30a028a93b2b03877f8cc6c72729
    b2003abb
fb_py_win_main.c 2.1 KB