Skip to content

Commit

Permalink
Fix bug in the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Viir committed Apr 20, 2020
1 parent ef5b9d0 commit ed4c943
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ static public IWebHostBuilder WithSettingProcessStoreSeparateReaderDirectoryPath
this IWebHostBuilder orig,
string processStoreSeparateReaderDirectoryPath) =>
orig.ConfigureServices(serviceCollection => serviceCollection.AddSingleton(
new FileStoreForProcessStoreReader(new FileStoreFromSystemIOFile(processStoreSeparateReaderDirectoryPath))));
new FileStoreForProcessStoreReader(
processStoreSeparateReaderDirectoryPath == null
? null
: new FileStoreFromSystemIOFile(processStoreSeparateReaderDirectoryPath))));

static public IWebHostBuilder WithWebAppConfigurationZipArchive(
this IWebHostBuilder orig,
Expand Down
8 changes: 5 additions & 3 deletions implement/elm-fullstack/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace elm_fullstack
{
class Program
{
static string AppVersionId => "2020-04-19";
static string AppVersionId => "2020-04-20";

static int Main(string[] args)
{
Expand All @@ -35,7 +35,7 @@ CommandOption verboseLogOptionFromCommand(CommandLineApplication command) =>
runServerCmd.ThrowOnUnexpectedArgument = false;

var processStoreDirectoryPathOption = runServerCmd.Option("--process-store-directory-path", "Directory in the file system to contain the backend process store.", CommandOptionType.SingleValue).IsRequired(allowEmptyStrings: false);
var processStoreSeparateReaderDirectoryPathOption = runServerCmd.Option("--process-store-separate-reader-directory-path", "Directory in the file system to read the backend process store to continue from, separate from the directory to write new store entries to. Typically used to test new versions before deploying to production.", CommandOptionType.SingleValue).IsRequired(allowEmptyStrings: false);
var processStoreSeparateReaderDirectoryPathOption = runServerCmd.Option("--process-store-separate-reader-directory-path", "Directory in the file system to read the backend process store to continue from, separate from the directory to write new store entries to. Typically used to test new versions before deploying to production.", CommandOptionType.SingleValue);
var webAppConfigurationFilePathOption = runServerCmd.Option("--web-app-configuration-file-path", "Path to a file containing the complete configuration in a zip-archive. If you don't use this option, the server uses the current directory as the source.", CommandOptionType.SingleValue);
var deletePreviousBackendStateOption = runServerCmd.Option("--delete-previous-backend-state", "Delete the previous state of the backend process. If you don't use this option, the server restores the last state backend on startup.", CommandOptionType.NoValue);
var frontendWebElmMakeAppendixOption = runServerCmd.Option("--frontend-web-elm-make-appendix", "Arguments to add when using elm make to build the frontend app.", CommandOptionType.SingleValue);
Expand All @@ -56,7 +56,9 @@ CommandOption verboseLogOptionFromCommand(CommandLineApplication command) =>
var webHostBuilder = Kalmit.PersistentProcess.WebHost.Program.CreateWebHostBuilder(runServerCmd.RemainingArguments.ToArray());

webHostBuilder.WithSettingProcessStoreDirectoryPath(processStoreDirectoryPath);
webHostBuilder.WithSettingProcessStoreSeparateReaderDirectoryPath(processStoreSeparateReaderDirectoryPath);

if (0 < processStoreSeparateReaderDirectoryPath?.Length)
webHostBuilder.WithSettingProcessStoreSeparateReaderDirectoryPath(processStoreSeparateReaderDirectoryPath);

var webAppConfigurationFilePath = webAppConfigurationFilePathOption.Value();

Expand Down
4 changes: 2 additions & 2 deletions implement/elm-fullstack/elm-fullstack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>elm_fullstack</RootNamespace>
<AssemblyName>elm-fullstack</AssemblyName>
<AssemblyVersion>2020.0419.0.0</AssemblyVersion>
<FileVersion>2020.0419.0.0</FileVersion>
<AssemblyVersion>2020.0420.0.0</AssemblyVersion>
<FileVersion>2020.0420.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit ed4c943

Please sign in to comment.