diff --git a/Scalar.Common/Platforms/POSIX/POSIXPlatform.cs b/Scalar.Common/Platforms/POSIX/POSIXPlatform.cs index 606b4e6728f..1d873991645 100644 --- a/Scalar.Common/Platforms/POSIX/POSIXPlatform.cs +++ b/Scalar.Common/Platforms/POSIX/POSIXPlatform.cs @@ -216,12 +216,6 @@ public override string GetScalarServiceNamedPipeName(string serviceName) return this.GetCommonAppDataRootForScalarComponent(serviceName) + ".pipe"; } - public override bool IsConsoleOutputRedirectedToFile() - { - // TODO(#1355): Implement proper check - return false; - } - public override bool IsElevated() { int euid = GetEuid(); diff --git a/Scalar.Common/Platforms/Windows/WindowsPlatform.cs b/Scalar.Common/Platforms/Windows/WindowsPlatform.cs index f94012118a4..10b4f8b28f0 100644 --- a/Scalar.Common/Platforms/Windows/WindowsPlatform.cs +++ b/Scalar.Common/Platforms/Windows/WindowsPlatform.cs @@ -12,7 +12,6 @@ using System.IO.Pipes; using System.Linq; using System.Management.Automation; -using System.Runtime.InteropServices; using System.Security.AccessControl; using System.Security.Principal; using System.ServiceProcess; @@ -28,22 +27,6 @@ public class WindowsPlatform : ScalarPlatform private const int StillActive = 259; /* from Win32 STILL_ACTIVE */ - private enum StdHandle - { - Stdin = -10, - Stdout = -11, - Stderr = -12 - } - - private enum FileType : uint - { - Unknown = 0x0000, - Disk = 0x0001, - Char = 0x0002, - Pipe = 0x0003, - Remote = 0x8000, - } - public WindowsPlatform() : base(underConstruction: new UnderConstructionFlags()) { } @@ -356,11 +339,6 @@ public override string GetUpgradeHighestAvailableVersionDirectory() public override Dictionary GetPhysicalDiskInfo(string path, bool sizeStatsOnly) => WindowsPhysicalDiskInfo.GetPhysicalDiskInfo(path, sizeStatsOnly); - public override bool IsConsoleOutputRedirectedToFile() - { - return FileType.Disk == GetFileType(GetStdHandle(StdHandle.Stdout)); - } - public override FileBasedLock CreateFileBasedLock( PhysicalFileSystem fileSystem, ITracer tracer, @@ -443,12 +421,6 @@ private static object GetValueFromRegistry(RegistryHive registryHive, string key return value; } - [DllImport("kernel32.dll")] - private static extern IntPtr GetStdHandle(StdHandle std); - - [DllImport("kernel32.dll")] - private static extern FileType GetFileType(IntPtr hdl); - public class WindowsPlatformConstants : ScalarPlatformConstants { public override string ExecutableExtension diff --git a/Scalar.Common/ScalarPlatform.cs b/Scalar.Common/ScalarPlatform.cs index 689dc68f6e2..e6132d35993 100644 --- a/Scalar.Common/ScalarPlatform.cs +++ b/Scalar.Common/ScalarPlatform.cs @@ -113,8 +113,6 @@ public string GetLogsDirectoryForGVFSComponent(string componentName) public abstract Dictionary GetPhysicalDiskInfo(string path, bool sizeStatsOnly); - public abstract bool IsConsoleOutputRedirectedToFile(); - public abstract bool TryKillProcessTree(int processId, out int exitCode, out string error); public abstract bool TryGetDefaultLocalCacheRoot(string enlistmentRoot, out string localCacheRoot, out string localCacheRootError); diff --git a/Scalar.UnitTests/Mock/Common/MockPlatform.cs b/Scalar.UnitTests/Mock/Common/MockPlatform.cs index 2e75ddcc2d4..366174a9680 100644 --- a/Scalar.UnitTests/Mock/Common/MockPlatform.cs +++ b/Scalar.UnitTests/Mock/Common/MockPlatform.cs @@ -105,11 +105,6 @@ public override void InitializeEnlistmentACLs(string enlistmentPath) throw new NotSupportedException(); } - public override bool IsConsoleOutputRedirectedToFile() - { - throw new NotSupportedException(); - } - public override bool IsElevated() { throw new NotSupportedException();