Skip to content

Commit

Permalink
providers: set HOME environment variable using posix format (canonica…
Browse files Browse the repository at this point in the history
…l#3135)

Windows was interpreting HOME as \root which caused various failures.
When reading home, make sure we use the posix-formatted string.

Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com>
  • Loading branch information
Chris Patterson and sergiusens committed May 21, 2020
1 parent 5e81451 commit 68f9864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snapcraft/internal/build_providers/_base_provider.py
Expand Up @@ -475,7 +475,7 @@ def _get_env_command(self) -> Sequence[str]:
)

# Set the HOME directory.
env_list.append(f"HOME={self._get_home_directory()}")
env_list.append(f"HOME={self._get_home_directory().as_posix()}")

# Configure SNAPCRAFT_HAS_TTY.
has_tty = str(sys.stdout.isatty())
Expand Down

0 comments on commit 68f9864

Please sign in to comment.