Skip to content

Commit

Permalink
Fix path seperator in var (#719)
Browse files Browse the repository at this point in the history
* Fix path seperator in var

":" on Unix vs ";" on Windows

* Fix os pathsep on an other case

Again pathsep is ":" on Unix & ";" on Windows
  • Loading branch information
ExaneServerTeam authored Jan 13, 2024
1 parent c99b8bd commit 0f5ab50
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def _on_progress(params):

def get_sphinx_env(config: SphinxConfig) -> Dict[str, str]:
"""Return the set of environment variables to use with the Sphinx process."""
env = {"PYTHONPATH": ":".join([str(p) for p in config.python_path])}
env = {"PYTHONPATH": os.pathsep.join([str(p) for p in config.python_path])}

passthrough = set(config.env_passthrough)
if IS_WIN and "SYSTEMROOT" not in passthrough:
Expand All @@ -356,7 +356,7 @@ def get_sphinx_env(config: SphinxConfig) -> Dict[str, str]:
value = os.environ.get(envname, None)
if value is not None:
if envname == "PYTHONPATH":
env["PYTHONPATH"] = f"{env['PYTHONPATH']}:{value}"
env["PYTHONPATH"] = f"{env['PYTHONPATH']}{os.pathsep}{value}"
else:
env[envname] = value

Expand Down

0 comments on commit 0f5ab50

Please sign in to comment.