mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-29 05:55:21 -04:00
Expand tilde to home directory on *nix systems in output path (#903)
This commit is contained in:
parent
6f87960513
commit
9cffbbc5ce
1 changed files with 10 additions and 2 deletions
|
@ -20,12 +20,20 @@ namespace DiscordChatExporter.Cli.Commands.Base;
|
|||
|
||||
public abstract class ExportCommandBase : TokenCommandBase
|
||||
{
|
||||
private string _outputPath = Directory.GetCurrentDirectory();
|
||||
|
||||
[CommandOption(
|
||||
"output",
|
||||
'o',
|
||||
Description = "Output file or directory path."
|
||||
)]
|
||||
public string OutputPath { get; init; } = Directory.GetCurrentDirectory();
|
||||
public string OutputPath
|
||||
{
|
||||
get => _outputPath;
|
||||
// Handle ~/ in paths on *nix systems
|
||||
// https://github.com/Tyrrrz/DiscordChatExporter/pull/903
|
||||
init => _outputPath = Path.GetFullPath(value);
|
||||
}
|
||||
|
||||
[CommandOption(
|
||||
"format",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue