cli: properly pass --edenfsctlPath on Windows

Summary:
For some unknown reason, we weren't setting this on Windows, which meant that
whenever edenfs would need to call edenfsctl (like at mount time when fixing up
redirections), it would always use the binary found in the PATH. While in most
cases this is OK, this is not the intended behavior for tests that are expected
to use the just compiled binary, not the one in the PATH.

Reviewed By: genevievehelsel

Differential Revision: D23653027

fbshipit-source-id: f1cc977e44b10c379d2b90bc7972bfec1fccad23
This commit is contained in:
Xavier Deguillard 2020-09-11 11:54:15 -07:00 committed by Facebook GitHub Bot
parent d5cafbb432
commit c957d40ff7

View File

@ -179,6 +179,8 @@ def get_edenfs_cmd(instance: EdenInstance, daemon_binary: str) -> List[str]:
cmd = [
daemon_binary,
"--edenfs",
"--edenfsctlPath",
os.environ.get("EDENFS_CLI_PATH", os.path.abspath(sys.argv[0])),
"--edenDir",
str(instance.state_dir),
"--etcEdenDir",
@ -187,10 +189,6 @@ def get_edenfs_cmd(instance: EdenInstance, daemon_binary: str) -> List[str]:
str(instance.user_config_path),
]
if sys.platform != "win32":
edenfsctl = os.environ.get("EDENFS_CLI_PATH", os.path.abspath(sys.argv[0]))
cmd += ["--edenfsctlPath", edenfsctl]
return cmd