fake -t registerSample throws `Win32Exception: The system cannot find the file specified`
I am getting the same error on two win10 PCs.
More verbosity does not give me more information
PS C:\code\azure\AAD.fs> dotnet fake build -t registerSample
...
Starting target 'registerSample'
.> "az" account show --query tenantId --output tsv (In: false, Out: true, Err: true)
---------------------------------------------------------------------
Script reported an error:
-> BuildFailedException: Target 'registerSample' failed.
-> One or more errors occurred. (Start of process 'az' failed.)
-> Start of process 'az' failed.
-> Win32Exception: The system cannot find the file specified
PS C:\code\azure\AAD.fs> az --version
azure-cli 2.27.0
Your CLI is up-to-date.
PS C:\code\azure\AAD.fs> az account show --query tenantId --output tsv
e04f0ef7-9398-4c7e-b22d-df1496f3ad32
> dotnet --version # tried both
3.1.401 [C:\Program Files\dotnet\sdk]
5.0.302 [C:\Program Files\dotnet\sdk]
Thanks, I haven't tried it on Windows, I'm guessing "az" is called something else on Windows, like "az.bat" or some such. I'll check.
I have looked into it and "it looked" like az.cmd is the excecutable on windows, and looks
@IF EXIST "%~dp0\..\python.exe" (
SET AZ_INSTALLER=MSI
"%~dp0\..\python.exe" -IBm azure.cli %*
) ELSE (
echo Failed to load python executable.
exit /b 1
)
It is calling a vendored python.exe which is addressed relative to the az.cmd file via %~dp0.
The latter does not work with the Fake.Core.CreateProcess used here
However
hm, yeah... so just calling "az.cmd" doesn't work either. Bummer, guess we'll have to find another way to start it.