mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
58a0971e4e
Summary: The `argv[0]` is used by libpython to decide the "executable path". However, libpython cannot handle `argv[0]` being a relative path in the buck test environment. Looking at the logic, it seems rather fragile. Therefore, use the Rust stdlib to resolve the full path of the current executable. Pass it as `argv[0]` to libpython, to make it able to insert the executable path correctly. This does affect `sys.argv[0]` seen from Python code. It is changed from a relative path (ex. `hg`) to a full path (ex. `/bin/hg`). It seems to be more executable and therefore might avoid some surprises. Reviewed By: markbt, xavierd Differential Revision: D15989622 fbshipit-source-id: 5a0d5b2f3e0b9ca1d97c84cb72d5dc079e9d3c1b |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |