Skip to content

Commit

Permalink
chore: normalize outputPath
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Jun 18, 2023
1 parent 23b8911 commit 6c436c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions source/Tool/GenerateAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ DoGenerateAction()
return absPath.getError();
auto workingDir = files::getParentDir(*absPath);

// normalize outputPath
if( toolArgs.outputPath.empty())
return Error("output path is empty");
toolArgs.outputPath = files::normalizePath(
files::makeAbsolute(toolArgs.outputPath,
(*config)->workingDir));

// Convert relative paths to absolute
AbsoluteCompilationDatabase compilations(
workingDir, *jsonCompilations, *config);
Expand Down
4 changes: 2 additions & 2 deletions source/Tool/ToolArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
namespace clang {
namespace mrdox {

ToolArgs ToolArgs::instance_;

//------------------------------------------------

ToolArgs::
Expand Down Expand Up @@ -107,8 +109,6 @@ R"(
{
}

ToolArgs ToolArgs::instance_;

void
ToolArgs::
hideForeignOptions()
Expand Down

0 comments on commit 6c436c2

Please sign in to comment.