Conversation
ac31257 to
e35ed48
Compare
e35ed48 to
561bff6
Compare
|
@charliermarsh I still get the warning described in #60 as can be seen here: https://github.com/astral-sh/setup-uv/actions/runs/10925849201/job/30328341490?pr=87#step:4:10 Could the reason be that |
Okay even when |
The reason was that |
dd940eb to
3f421bc
Compare
Make sure the default tool bin dir or the user supplied is added to the PATH. On Windows the tool dir and tool bin dir is moved to the TMP dir to take advantage of the fact that on GitHub hosted Windows runners this is on the faster D: drive
3f421bc to
e712968
Compare
| - name: Install the latest version of uv with a custom tool dir | ||
| uses: astral-sh/setup-uv@v3 | ||
| with: | ||
| tool-dir: "/path/to/tool/dir" |
There was a problem hiding this comment.
Should this not just be done via env:?
There was a problem hiding this comment.
A user would have to add this to every step using uv then. That's why I decided against it.
| ### UV_TOOL_DIR | ||
|
|
||
| On Windows `UV_TOOL_DIR` is set to `uv-tool-dir` in the `TMP` dir (e.g. `D:\a\_temp\uv-tool-dir`). | ||
| On GitHub hosted runners this is on the much faster `D:` drive. |
There was a problem hiding this comment.
So the cache is also on the D: drive, is that right?
There was a problem hiding this comment.
Yes. It's also in the TMP dir so D:\a\_temp\ on Windows
There was a problem hiding this comment.
Added documentation for the default value of UV_CACHE_DIR
| return toolBinDirInput; | ||
| } | ||
| if (process.platform === "win32") { | ||
| return "D:\\a\\_temp\\uv-tool-bin-dir"; |
There was a problem hiding this comment.
The docs said it's on D: on GitHub-hosted runners. But isn't this setting it on all runners? Is that ok?
There was a problem hiding this comment.
Good catch. I should rather implement it like the cache, look for RUNNER_TEMP first and only use a static value as fallback.
On second thought maybe even fail if RUNNER_TEMP is not set. The static fallback path (and drive) might not even exist and then fail with hard to understand error messages
There was a problem hiding this comment.
Changed it to throw if RUNNER_TEMP is not set.
| return `${process.env.RUNNER_TEMP}${path.sep}uv-tool-bin-dir`; | ||
| } | ||
| throw Error( | ||
| "Could not determine UV_TOOL_BIN_DIR. Please make sure RUNNER_TEMP is set or provide the tool-bin-dir input", |
There was a problem hiding this comment.
Is it that RUNNER_TEMP is always defined on GitHub runners?
There was a problem hiding this comment.
So tests show that it is and I could not find contrary information
Fixes: #83
Fixes: #60