From 136e19de5d81ee0d397604ce54d8ed06f876004b Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Thu, 4 Jun 2020 16:25:06 +0200 Subject: [PATCH] Set the working directory for Powershell IO methods --- make.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/make.ps1 b/make.ps1 index 92b0d06..b1a3d48 100644 --- a/make.ps1 +++ b/make.ps1 @@ -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)