From 1c4e395b0f84dfadba994f4863d9b37134f705f1 Mon Sep 17 00:00:00 2001 From: Alex Berry Date: Wed, 4 Mar 2020 20:14:59 +0000 Subject: [PATCH] Fixing relative path issue --- README.md | 2 +- compile.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47da698..72b282f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ And answer with A: ## Usage ### All-Cores mode -To run this script with all available cores, open a powershell terminal, cd to this directory and run: +To run this script with all available cores, either double-click it or open a powershell terminal, cd to this directory and run: ```powershell .\compile.ps1 diff --git a/compile.ps1 b/compile.ps1 index e3aa240..83b27c6 100644 --- a/compile.ps1 +++ b/compile.ps1 @@ -17,7 +17,7 @@ else { $files = (ls *.pwn).Name # Set the working directory to pass in to the background job -$workdir = (pwd) +$workdir = (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) # Define the script block, used by start-job when initiating the background job. This block defines the command that will be run, along with it's parameters. $Block = {