-
-
Notifications
You must be signed in to change notification settings - Fork 13
[macOS] Yarn executable missing executable bit #19
Comments
On second investigation, and alternate solution/workaround: run it with |
Interesting, I haven't seen this before and I'm using the package in macOS and Linux. Can you share more details? Which version of the package are you using? Are you building with VS for Mac, |
I'm using VSfM. It is an F# Xamarin.Mac project that has the Yarn target, which causes a build and bundling of an F# fable .NET Core 2.2 project. Interestingly enough I've updated my IDE (to the latest -- version 8.1.1 build 72), and can no longer reproduce the problem. I had never tried building with the command line via |
Nevermind, I lied; I forgot to add the yarn reference back after temporarily removing it. Yarn.MSBuild resolved version is 1.15.2 .
Here's a log from running
I'm referencing it in my Xamarin.Mac project like so:
|
It seems like this is a quirk of MSBuild for mono. MSBuild for dotnet works fine. .nupkg files are actually just ZIP, which does not support Linux permissions, so to fix this we need to either chmod yarn before running it or use sh. I'm on vacation for 2 weeks and don't have a laptop, but I would take a PR to fix this if you want a fix sooner. |
I looked into this a little more, and haven't been able to reproduce the problem using the version of mono you listed (5.18.1). I'm not sure what I can do to fix this. It appears the executable bit is set by NuGet when it is extracting the package (NuGet/NuGet.Client#1346). If you are not seeing this happen, you might be using an older version of NuGet which doesn't do this correctly (see NuGet/Home#4424). Try updating all of your .NET Core/VS/Rider installations to use the latest NuGet version. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. Thank you for your contributions to this project. |
Hmm I've run into this again while creating a sample application for my library. Here's a repo: https://github.com/jwosty/InterstellarFableHelloWorld/tree/2eed9ed17192abdb79a593b0559941b23057a6ce Are you able to build this thing in VS for Mac? I can't. :/ |
VS for Mac indicates it's using mono 6.4.0.208 (though mono 5.18.1.28 is also listed as being installed). It also fails for the same reason when building with |
Don't know what is wrong with VS for Mac, but here's a simple fix: #25 |
Build gives an error:
performing
ls -l packages/Yarn.MSBuild/dist/bin/yarn
shows the permissions-rw-r-r--r--
; in other words, not executable. Workaround is to runchmod +x packages/Yarn.MSBuild/dist/bin/yarn
, which fixes the problem temporarily.I believe a solution is to make sure that the nuget package is built on a unix system, so that the executable bit can survive. If I can be of any help, let me know.
The text was updated successfully, but these errors were encountered: