Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Pass config directory to JvmOptionsParser #368

Merged
merged 1 commit into from
May 19, 2020
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,9 @@ protected sealed override IEnumerable<string> CreateObservableProcessArguments(I

if (!this.JavaVersionChecker.Start(null, out var javaVersionOut))
throw new StartupException($"Invalid Java version reported: {javaVersionOut}");

var jvmOptionsFile = Path.Combine(this.ConfigDirectory, "jvm.options");
if (!this.JvmOptionsParser.Start(new [] { $"\"{jvmOptionsFile}\"" }, out var jvmOptionsLine) || string.IsNullOrWhiteSpace(jvmOptionsLine))
throw new StartupException($"Could not evaluate jvm.options file: {jvmOptionsFile} result: {jvmOptionsLine}");

if (!this.JvmOptionsParser.Start(new [] { $"\"{this.ConfigDirectory}\"" }, out var jvmOptionsLine) || string.IsNullOrWhiteSpace(jvmOptionsLine))
throw new StartupException($"Could not evaluate jvm.options file. result: {jvmOptionsLine}");
jvmOptionsLine = jvmOptionsLine.Replace("${ES_TMPDIR}", this.PrivateTempDirectory).Replace("\n", "").Replace("\r", "");

return new []
Expand Down