-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FORCE_COLOR=true
causes "Cache folder path is retrieved for yarn but doesn't exist on disk"
#772
Comments
Hello, @bencochran ! Thank you for reporting the issue, we will take a look at it and see what can be done :) |
Hello @bencochran. Could you please try to use the snippet from this comment: #317 (comment) |
Thanks pointing me to that, @dmitry-shibanov. That also makes it work. Embarrassingly, I did see that issue, but didn’t read deep enough into the comments to find that it came down to the same issue. Sorry about the dupe! |
Hello @bencochran. Sorry for the late response. For now I'm going to close the issue because it can be fixed by |
actions/setup-node#772 Signed-off-by: David Festal <dfestal@redhat.com>
This was due to the following bug: actions/setup-node#772 Signed-off-by: David Festal <dfestal@redhat.com>
chore(ci): fix a CI error in setup-node This was due to the following bug: actions/setup-node#772 Signed-off-by: David Festal <dfestal@redhat.com>
Description:
tl;dr:
FORCE_COLOR=true
in build environment causesyarn cache dir
output to be prefixed with "\u001b[2K\u001b[1G
" which gets pulled in ascachePath
, which definitely doesn’tfs.existsSync
.Workaround at the end if google leads you here before this is fixed.
The story version:
I kept having failures on “Post Run actions/setup-node@v3” on a seemingly minimal yarn action:
The failure I was getting:
I connected to the worker to poke around… that directory was indeed there. I try
fs.existSync
ing the directory myself from node, thinking it’s something wacky with permissions… works fine.Well… it turns out the
cachePath
is\u001b[2K\u001b[1G/home/runner/.cache/yarn/v6
with some pesky ANSI control characters hanging around. Copy-pasting it works just fine but, of course, those characters are in the js string.yarn cache dir
itself seems to throw those in to erase the entire line and move the cursor to the first column. Thanks, yarn.Action version:
3.4.1
Platform:
Runner type:
Tools version:
Repro steps:
Minimal repro repo: https://github.com/bencochran/setup-node-assi-escape-code-bug
Or:
FORCE_COLOR=true
Expected behavior:
I expect the cache to work. And not fail the job.
Actual behavior:
The cache doesn't work and the job fails at the post-step action with the following:
Workaround:
Remove
FORCE_COLOR
or move theenv
into a specific step like:The text was updated successfully, but these errors were encountered: