Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ typings/
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.vscode

# Sensitive or high-churn files:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import sys
import logging
import locale

from .utils import OSUtils

Expand Down Expand Up @@ -49,14 +50,18 @@ def run(self, args, cwd=None):

LOG.debug("executing dotnet: %s", invoke_dotnet)

# DotNet output is in system locale dependent encoding
# https://docs.microsoft.com/en-us/dotnet/api/system.console.outputencoding?view=netcore-3.1#remarks
# "The default code page that the console uses is determined by the system locale."
encoding = locale.getpreferredencoding()
p = self.os_utils.popen(invoke_dotnet, stdout=self.os_utils.pipe, stderr=self.os_utils.pipe, cwd=cwd)

out, err = p.communicate()

# The package command contains lots of useful information on how the package was created and
# information when the package command was not successful. For that reason the output is
# always written to the output to help developers diagnose issues.
LOG.info(out.decode("utf8").strip())
LOG.info(out.decode(encoding).strip())

if p.returncode != 0:
raise DotnetCLIExecutionError(message=err.decode("utf8").strip())
raise DotnetCLIExecutionError(message=err.decode(encoding).strip())
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_must_build_python_project_through_makefile(self):
"chardet",
"urllib3",
"idna",
"urllib3-1.25.9.dist-info",
"urllib3-1.25.10.dist-info",
"chardet-3.0.4.dist-info",
"certifi-2020.4.5.2.dist-info",
"certifi",
Expand Down