Skip to content

Framework throws exception while updating components with same version #50

@LordHepipud

Description

@LordHepipud

While trying to update Framework components, you will receive an exception during an update if the current and target version is identical

Ausnahme beim Aufrufen von "Format" mit 2 Argument(en):  "Der Wert darf nicht NULL sein.
Parametername: args"
In C:\Program
Files\WindowsPowerShell\Modules\icinga-powershell-framework\lib\core\framework\Install-IcingaFrameworkPlugins.psm1:10
Zeichen:5
+     Write-Host ([string]::Format('Installing module into "{0}"', ($Ar ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException

Test-Path : Das Argument kann nicht an den Parameter "Path" gebunden werden, da es NULL ist.
In C:\Program
Files\WindowsPowerShell\Modules\icinga-powershell-framework\lib\core\framework\Expand-IcingaZipArchive.psm1:8
Zeichen:20
+     if ((Test-Path $Path) -eq $FALSE -Or (Test-Path $Destination) -eq ...
+                    ~~~~~
    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCom
   mand

Ausnahme beim Aufrufen von "ExtractToDirectory" mit 2 Argument(en):  "Ein leerer Pfad ist unzulässig."
In C:\Program
Files\WindowsPowerShell\Modules\icinga-powershell-framework\lib\core\framework\Expand-IcingaZipArchive.psm1:16
Zeichen:9
+         [System.IO.Compression.ZipFile]::ExtractToDirectory($Path, $D ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ArgumentException

Expected Behavior

The Framework should not crash and continue working

Current Behavior

The Framework is crashing while trying to update to a version identical to the current installed one

Possible Solution

Check properly if the version is matching and handle the return values properly

Steps to Reproduce (for bugs)

  1. Install the current stable
  2. Try to update on the stable branch
  3. The Framework will crash

Metadata

Metadata

Assignees

Labels

BugThere is an issue present

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions