未验证 提交 e8d32c10 编写于 作者: V Vitek Karas 提交者: GitHub

Small diagnostics improvements to HostWriter (#75593)

- Print out file permissions in octal (as per Linux standard)
- Actually print out error enum value when MachO processing fails
上级 c3d09aa3
......@@ -37,6 +37,7 @@ public sealed class AppHostMachOFormatException : AppHostUpdateException
public readonly MachOFormatError Error;
internal AppHostMachOFormatException(MachOFormatError error)
: base($"Failed to process MachO file: {error}")
{
Error = error;
}
......
......@@ -141,7 +141,7 @@ void UpdateResources()
if (chmodReturnCode == -1)
{
throw new Win32Exception(Marshal.GetLastWin32Error(), $"Could not set file permission {filePermissionOctal} for {appHostDestinationFilePath}.");
throw new Win32Exception(Marshal.GetLastWin32Error(), $"Could not set file permission {Convert.ToString(filePermissionOctal, 8)} for {appHostDestinationFilePath}.");
}
if (enableMacOSCodeSign && RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && HostModelUtils.IsCodesignAvailable())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册