mason
mason copied to clipboard
FileSystemException: Creation failed. (OS Error: File name too long, errno = 63)
Description
I am attempting to share a private brick with another developer by including a GitHub personal access token in the git url:
bricks:
fast_app:
git:
url: https://CodeOTR:github_pat_11ALOGDJY0vn1GnxTviLBe_nBcG9xOV2eUBIuPNORN........@github.com/CodeOTR/flutterfaster_bricks
path: bricks/fast_app
Because the URL is so long, however, mason get
throws an error:
FileSystemException: Creation failed, path = '/Users/josephmuller/.mason-cache/git/flutterfaster_bricks_aHR0cHM6Ly9Db2RlT1RSOmdpdGh1Yl9wYXRfMTFBTE9HREpZMHZuMUdueFR2aUxCZV9uQmNHOXhPVjJlVUJJdVBOT1JOUzNtT3dQZVVWbTBWM2k5bEdNSVVqTWhRQ1UzVVc1VjJMVnRqV1VVQUBnaXRodWIuY29tL0NvZGVPVFIvZmx1dHRlcmZhc3Rlcl9icmlja3M=_4a84d0db6d0372fd9b1c2062d43505cd35a8cdd2' (OS Error: File name too long, errno = 63)
Steps To Reproduce
- Create a new GitHub repo
- Create a PAT with the "content" permission
- Add a brick to the new repo
- In a Flutter/dart project, create a mason.yaml file and add the brick you just created by adding your username and PAT to the git url
Ex.
ricks:
fast_app:
git:
url: https://<USER NAME>:<PAT>@github.com/CodeOTR/flutterfaster_bricks
path: bricks/fast_app
Expected Behavior
This should not break. I would expect the file name to be shortened to a reasonable length. Currently it seems like a hash of the git URL.