Skip to content

Commit

Permalink
ModuleManager
Browse files Browse the repository at this point in the history
- Calling `addSearchPath(string path)` will now validate the path before adding it
  • Loading branch information
deavmi committed Oct 29, 2023
1 parent 2f3a951 commit 66b238f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/tlang/compiler/modman/modman.d
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public final class ModuleManager
}
}

// Check that the path is valid
if(!validate(path))
{
throw new ModuleManagerError(this, "The provided search path '"~path~"' is invalid");
}

// Add path
this.searchPaths ~= absPath;
}
Expand Down

0 comments on commit 66b238f

Please sign in to comment.