We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24d6264 commit 477b141Copy full SHA for 477b141
1 file changed
src/Compile-SourceScript/Public/Compile-SourceScript.ps1
@@ -215,7 +215,8 @@ function Compile-SourceScript {
215
}
216
217
# Alert the user on the situation of the plugin
218
- $updatedPlugin = Get-Item -Path "$PLUGINS_DIR/$($_.Name)"
+ $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 }
220
$updatedPluginHash = (Get-FileHash -Path $updatedPlugin -Algorithm MD5).Hash
221
if ($updatedPluginHash -eq $compiledPluginHash) { "`n Plugin successfully copied to '$($_.Fullname)'" | Write-Host -ForegroundColor Green }
222
else { "`n Failed to copy to the plugins directory." | Write-Host -ForegroundColor Magenta; return }
0 commit comments