Skip to content

Commit f5ae9a8

Browse files
committed
Fix minor regressions in behaviour
1 parent 14b17f8 commit f5ae9a8

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/Options.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,5 @@ public class DocsOptions
7171

7272
[Option('l', "local", Default = false, HelpText = "Opens a local copy of the documentation.")]
7373
public bool Local { get; set; }
74-
75-
[Option("latest", Default = false, HelpText = "Specifies latest version")]
76-
public bool Latest { get; set; }
7774
}
7875
}

src/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private static int Pull(PullOptions opts)
188188
}
189189
else
190190
{
191-
Console.Error.WriteLine(Output.Red($"Couldn't find a version to install. To download latest version use option --latest"));
191+
Console.Error.WriteLine(Output.Red($"Couldn't find a version to install. To download latest version use 'latest'"));
192192
return 2;
193193
}
194194
}
@@ -234,7 +234,7 @@ private static int Pull(PullOptions opts)
234234
private static int Docs(DocsOptions opts)
235235
{
236236
// If version provided is "latest", it is being replaced with currently most recent one
237-
if (opts.Latest)
237+
if (opts.Version == "latest")
238238
{
239239
opts.Version = VersionManager.GetLatestDarkRiftVersion();
240240
}
@@ -250,7 +250,7 @@ private static int Docs(DocsOptions opts)
250250
}
251251
else
252252
{
253-
Console.Error.WriteLine(Output.Red($"Couldn't find a version to download documentation. To download latest version use option --latest"));
253+
Console.Error.WriteLine(Output.Red($"Couldn't find a version to download documentation. To download latest version 'latest'"));
254254
return 2;
255255
}
256256
}
@@ -260,7 +260,7 @@ private static int Docs(DocsOptions opts)
260260
if (VersionManager.IsDocumentationInstalled(opts.Version))
261261
BrowserUtil.OpenTo("file://" + VersionManager.GetDocumentationPath(opts.Version) + "/index.html");
262262
else
263-
Console.Error.WriteLine(Output.Red($"Documentation not installed, consider running \"darkrift pull --docs --version {opts.Version}\""));
263+
Console.Error.WriteLine(Output.Red($"Documentation not installed, consider running \"darkrift pull {opts.Version} --docs\""));
264264
}
265265
else if (opts.Version != null)
266266
{

0 commit comments

Comments
 (0)