Set the working directory for Powershell IO methods

This commit is contained in:
abcdefg30 2020-06-04 16:25:06 +02:00 committed by Paul Chote
parent c4fd6c708d
commit 136e19de5d

View File

@ -288,6 +288,10 @@ else
$command = $args
}
# Set the working directory for our IO methods
$templateDir = $pwd.Path
[System.IO.Directory]::SetCurrentDirectory($templateDir)
# Load the environment variables from the config file
# and get the mod ID from the local environment variable
ParseConfigFile "mod.config"
@ -304,7 +308,6 @@ $env:MOD_SEARCH_PATHS = (Get-Item -Path ".\" -Verbose).FullName + "\mods,./mods"
# Run the same command on the engine's make file
if ($command -eq "all" -or $command -eq "clean")
{
$templateDir = $pwd.Path
$versionFile = $env:ENGINE_DIRECTORY + "/VERSION"
$currentEngine = ""
if (Test-Path $versionFile)