Azure / Azure/azure-functions-powershell-worker

PowerShell cache files are created at a wrong location

Open
#365 2 comments 0 reactions 1 assignee Claimed by @AnatoliB View on GitHub
cold start
Dominant language
C#
Stars
215
Forks
61
Avg merge
21h 4m
Merged PRs (30d)
6

Description

After invoking a function on Azure for the first time, a PowerShell command analysis cache file is created at **D:\home\site\wwwroot**\Microsoft\PowerShell. This is a problem because:

1. Depending on the deployment options, this location may not be writable. In this case, PowerShell will not be able to take advantage of the cache, which may impact execution performance (the impact has not been measured yet, though).
2. When the location is writable, new files appearing under D:\home\site\wwwroot may surprise the user or even break the app.

On Windows, PowerShell command analysis cache files normally appear at C:\Users\\AppData\Local\Microsoft\PowerShell. I suspect the problem on Azure is caused by certain APIs returning an empty string or null instead of ...\AppData\Local on the sandbox.

**D:\home\data** would be a better location for these files.

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.