Azure / azure-functions-core-tools

Command line tools for Azure Functions
MIT License
1.32k stars 433 forks source link

Latest version reports it is old #3776

Open HolisticDeveloper opened 3 months ago

HolisticDeveloper commented 3 months ago

Version

Core Tools Version: 4.0.1 Commit hash: N/A +807e89766a92b14fd07b9f0bc2bea1d8777ab209 (32-bit) Function Runtime Version: 4.834.3.22875

Description

I have the latest v4.0.5907 release installed, but when I run func it includes the following statement at the end of the output:

You are using an old Core Tools version. Please upgrade to the latest version.

Steps to reproduce

  1. Install via chocolatey: choco install azure-functions-core-tools.
  2. In a PowerShell prompt, run func.
  3. Observe the output.
HolisticDeveloper commented 3 months ago

By default, the Chocolatey package downloads https://functionscdn.azureedge.net/public/4.0.5907/Azure.Functions.Cli.win-x86.4.0.5907.zip. It ends up creating a shim that points at the unzipped in-proc8\func.exe. It is this exe that has the 4.0.1 version. (.\func.exe has the correct version.)

fabiocav commented 1 month ago

@kshyju has more context on this.

VineethReyya commented 3 days ago

Hi @kshyju, looking at the Logs of the chocolatey, shim for generating twice (we have 2 executables: one in root folder and other in inproc8) and --iconpath(target path) is getting replaced with inproc8/func.exe when shim is generated 2nd time. so, it is running the func.exe present in 'root/inproc8' folder. Could you please provide overview on whether shim needs to generate twice or based on some condition ( [installation script] (https://github.com/Azure/azure-functions-core-tools/blob/v4.x/publish-scripts/chocolatey/installps_template) of chocolatey). Image