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 @@ -215,10 +215,11 @@ function Compile-SourceScript {
215215 }
216216
217217 # Alert the user on the situation of the plugin
218- $updatedPlugin = Get-Item - Path " $PLUGINS_DIR /$ ( $_.Name ) "
218+ $updatedPlugin = Get-Item - Path " $PLUGINS_DIR /$ ( $_.Name ) " - ErrorAction SilentlyContinue
219+ if (! $updatedPlugin ) { " `n Plugin does not exist in the plugins directory." | Write-Host - ForegroundColor Magenta; return }
219220 $updatedPluginHash = (Get-FileHash - Path $updatedPlugin - Algorithm MD5).Hash
220221 if ($updatedPluginHash -eq $compiledPluginHash ) { " `n Plugin successfully copied to '$ ( $_.Fullname ) '" | Write-Host - ForegroundColor Green }
221- else { " `n Failed to copy to the plugins directory." | Write-Host - ForegroundColor Magenta; return }
222+ else { " `n Failed to update existing plugin in the plugins directory." | Write-Host - ForegroundColor Magenta; return }
222223 }
223224
224225 # Throw an error if the copying process failed
You can’t perform that action at this time.
0 commit comments