Azure / Azure/azure-functions-powershell-worker

Investigate removing dependency on `dotnet` executable in the path

Open
#195 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
215
Forks
61
Avg merge
21h 4m
Merged PRs (30d)
6

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:
```json
{
"description":{
"language":"powershell",
"extensions":[".ps1", ".psm1"],
"defaultExecutablePath":"dotnet",
"defaultWorkerPath":"Microsoft.Azure.Functions.PowerShellWorker.dll"
}
}
```

Ideally those would be the same thing:

```json
{
"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:

```json
{
"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](https://github.com/Microsoft/vscode-azurefunctions/pull/1204)...

@pragnagopa @asavaritayal @fabiocav can you weigh in here?

(cc @SteveL-MSFT @joeyaiello @daxian-dbw)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.