File tree Expand file tree Collapse file tree
src/Compile-SourceScript/Public Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,10 +103,14 @@ function Compile-SourceScript {
103103 }
104104 $SCRIPTING_DIR = $sourceFile.DirectoryName
105105 $COMPILED_DIR = Join-Path $SCRIPTING_DIR $MOD [$MOD_NAME ][' compiled_dir_name' ]
106+ $COMPILER_PATH = Join-Path $SCRIPTING_DIR $COMPILER_NAME
106107 $PLUGINS_DIR = Join-Path (Split-Path $SCRIPTING_DIR - Parent) $MOD [$MOD_NAME ][' plugins_dir_name' ]
107108
108109 # Verify the presence of the compiler item
109- $compiler = Get-Item - Path (Join-Path $SCRIPTING_DIR $COMPILER_NAME )
110+ $compiler = Get-Item - Path $COMPILED_DIR - ErrorAction SilentlyContinue
111+ if (! $compiler ) {
112+ throw " Cannot find the plugin compiler at the path '$COMPILER_PATH '."
113+ }
110114
111115 }catch {
112116 Write-Error - Exception $_.Exception - Message $_.Exception.Message - Category $_.CategoryInfo.Category - TargetObject $_.TargetObject
You can’t perform that action at this time.
0 commit comments