Ensure Mongo database directory exists.

This commit is contained in:
Toke Stuart Jepsen 2022-12-02 15:29:45 +00:00
parent c56a84e694
commit 9e40ef96a2

View file

@ -112,4 +112,6 @@ $mongoPath = Find-Mongo $preferred_version
Write-Color -Text ">>> ", "Using DB path: ", "[ ", "$($dbpath)", " ]" -Color Green, Gray, Cyan, White, Cyan
Write-Color -Text ">>> ", "Port: ", "[ ", "$($port)", " ]" -Color Green, Gray, Cyan, White, Cyan
New-Item -ItemType Directory -Force -Path $($dbpath)
Start-Process -FilePath $mongopath "--dbpath $($dbpath) --port $($port)" -PassThru | Out-Null