I have a very simple script that uses Copy-Item in the Task Build section following the psake conventions (and examples). Right now that's all it does in an attempt to simplify the script to debug this issue.
The Error:
18/07/2011 5:40:57 PM: An Error Occurred:
Exec: Error executing command: Copy-Item "$src_dir..\somefolder*.dll" $bin_dir
I have tried just outputting the file paths via Write-Host and they look fine.
I need some help please debugging this, getting the script code (Copy-Item) to work in isolation to psake isn't an objective.
The Script:
Properties {
$src_dir = Split-Path $psake.build_script_file
$bin_dir= "$build_dir\..\Binaries\"
}
include .\psake_ext.ps1
Task Build -Depends Clean, Init {
Write-Host "about to error here:"
Exec { Copy-Item "$src_dir\..\somefolder\*.dll" $bin_dir }
Write-Host "do NOT get this far"
#more similar Exec copy commands, that don't execute
}
Task Clean {
}
Also note:
This script was working and only intermittently failing in the very recent past, but now seems to fail more consistently.
Executed via:
.\psake.ps1 "failing-copy-script.ps1" Build
So this question has an answer, summarizing the comments from question and other info:
If you are experiencing this issue diagnostic steps to take: