From d537617916f626b62e0f96782387e60ec1ac9139 Mon Sep 17 00:00:00 2001 From: James Winkler Date: Tue, 26 Jan 2021 10:50:55 -0800 Subject: [PATCH] Restore constructor --- src/Sarif.Driver/Sdk/CommandBase.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Sarif.Driver/Sdk/CommandBase.cs b/src/Sarif.Driver/Sdk/CommandBase.cs index 6a9f6aa33..94491ac12 100644 --- a/src/Sarif.Driver/Sdk/CommandBase.cs +++ b/src/Sarif.Driver/Sdk/CommandBase.cs @@ -18,6 +18,13 @@ public abstract class CommandBase protected IFileSystem FileSystem { get; set; } + // TODO: Removing this constructor broke the one of AbsoluteUriCommand entirely but all unit tests were passing + // Add unit tests that will break when this constructor is deleted or malfunctioning. + public CommandBase(IFileSystem fileSystem = null) + { + this.FileSystem = fileSystem ?? Sarif.FileSystem.Instance; + } + // TODO: What's the point of having a bunch of static methods in an abstract class? // We even have a static class, "CommandUtilities" which seems like the more appropriate // place for these to go.