Hi,
I received the following failure when executing a runbook with a “Run a Script” step:
08:46:38 Info | Extracting package 'C:\Octopus\Packages\Spaces-1\feeds-builtin\Cbh.Sales.Features\Cbh.Sales.Features.21.22.16194.0.nupkg' to 'C:\Octopus\Work\20210729004637-144638-1600'
08:46:39 Warning | No files were found that match the substitution target pattern 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\DisableNominateAfterContracting.ps1'
08:46:39 Verbose | Executing 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\DisableNominateAfterContracting.ps1'
08:46:39 Verbose | Retry #1 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:46:40 Verbose | Retry #2 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:46:40 Verbose | Retry #3 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:46:40 Verbose | Retry #4 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:46:50 Verbose | Retry #54 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:00 Verbose | Retry #104 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:10 Verbose | Retry #154 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:20 Verbose | Retry #204 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:30 Verbose | Retry #254 on overwrite 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'. Exception: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
08:47:39 Error | System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Octopus\Work\20210729004637-144638-1600\FeatureToggleScripts\Octopus.FunctionAppenderContext.ps1'.
It turns out that the folder containing the script to execute (FeatureToggleScripts in this example) was wrong (and hence didn’t exist).
It would be better if we got a FileNotFoundException on the script specified to make it more clear?
Version info here:
08:46:37 Verbose | Octopus Server version: 2020.5.4+Branch.tags-2020.5.4.Sha.257d21682c55636942d2a93bb43ff0e8f7095a49
08:46:37 Verbose | Using Calamari.netfx 15.1.6
Thanks,
Ant.