Description
Right now, because the Azure Functions host calls the worker using:
dotnet ./path/to/worker/Microsoft.Azure.Functions.PowerShellWorker.dll
dotnet
has to be in the path... Ideally, we shouldn't have to do this and either bundle the runtime with the worker or share the runtime with Azure Functions Host.
Firstly, we need the host to give us a way to run single executables:
Today we have to specify an executable path and a worker path:
{
"description":{
"language":"powershell",
"extensions":[".ps1", ".psm1"],
"defaultExecutablePath":"dotnet",
"defaultWorkerPath":"Microsoft.Azure.Functions.PowerShellWorker.dll"
}
}
Ideally those would be the same thing:
{
"description":{
"language":"powershell",
"extensions":[".ps1", ".psm1"],
"defaultWorkerExecutablePath":"Microsoft.Azure.Functions.PowerShellWorker.exe"
}
}
But, that would only work on Windows... so we'd need to be able to specify different executables on macOS and Linux so we can be cross platform:
{
"description":{
"language":"powershell",
"extensions":[".ps1", ".psm1"],
"defaultWorkerExecutablePath": {
"windows":"Microsoft.Azure.Functions.PowerShellWorker.exe",
"macos":"Microsoft.Azure.Functions.PowerShellWorker",
"linux":"Microsoft.Azure.Functions.PowerShellWorker",
}
}
I've already had to mention to a couple people that .NET SDK is required... and the Azure Functions Core Tools are moving away from the dependency on dotnet
cli...
@pragnagopa @asavaritayal @fabiocav can you weigh in here?