Open kkostenkov opened 1 month ago
This branch could be used for the repro
@kkostenkov Sorry for slow responding.
After version 1.11.13, workingDirectory parameter is executed on the begining of the action.
Is your problem is solved?
Thank you so much for the reply. Meanwhile I did the investigation on my own and it appears that the dotnet tool update
command is present in two places in the repo. (My lack of knowledge did not allow me to understand why)
And the first execution of it comes before the main.ts
flow and fails even if I change the working directory.
Yesterday I did another iteration to solve the matter and it appears that those changes help:
await
to process.chdir(workingDir)
And the most important process.chdir(
..)
to Installer class in index.js . This is the other place of calling dotnet tool update
I personally have no idea why 1 & 2 are needed since I managed to make it work without using workingDirectory parameter in the end, but without those changes the workflow kept failing.
So to answer your question directly: no. Simply moving the execution of workingDirectory parameter won't help to solve the issue.
Command
dotnet tool update
is run as soon as Action starts and due to a very old bug in the tool it fails if the directory contains multiple projects.In my case this is a game changer because some Unity projects have
.sln
and.csproj
files in the root of the repo.Maybe the parsing and execution of workingDirectory parameter could be moved to the beginning of the action? Then maybe that parameter could be used as a workaround with the value of
./..