Hello,
As part of my deploys, I have a powershell script that I’ve placed in the package directory (think /Production/packageName) that I’m trying to run after the nuget package is deployed (a website). I’ve create the following powershell script to run, but I’m getting the error:
Get-Item : Cannot bind argument to parameter 'Path' because it is null.
Error 14:10:09
At C:\Windows\system32\config\systemprofile\AppData\Local\Tentacle\Temp\43c63ba
Error 14:10:09
1-1e3b-4c29-97a2-e3491db9939a.ps1:7 char:18
Error 14:10:09
+ $dir = (get-item ($installedPath)).Parent
Error 14:10:09
+ ~~~~~~~~~~~~~~~~
Error 14:10:09
+ CategoryInfo : InvalidData: (:) [Get-Item], ParentContainsError
Error 14:10:09
RecordException
Error 14:10:09
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
Error 14:10:09
icrosoft.PowerShell.Commands.GetItemCommand
Info 14:10:09
==============================================
PowerShell exit code: 1
==============================================
Fatal 14:10:09
PowerShell script returned a non-zero exit code: 1
Tentacle version 2.6.1.796
$installedPath = $OctopusParameters['Octopus.Tentacle.PreviousInstallation.OriginalInstalledPath']
$dir = (get-item ($installedPath)).Parent
Set-Location -Path ($dir.FullName)
# Run the script
.\UpdatePayment.ps1
Any ideas? The error makes me think that $installedPath is null or empty but is $OctopusParameters[‘Octopus.Tentacle.PreviousInstallation.OriginalInstalledPath’] the right parameter I should be using? If so, why is it empty?