Skip to content

Commit

Permalink
Use a different default path for esy prefix
Browse files Browse the repository at this point in the history
On Windows, we ran into EXDEV issues when the cache drive and working
directory drive is different. When $HOME is changed to D:/ on Windows,
cache restore fails too

```
  ../../../.esy/3____________________________________________________________________________/i/esy_openssl-20afd0e0/share/man/man7/Ed448.7: Can't create '\\\\?\\D:\\a\\dream-web-server-sessions\\dream-web-server-sessions\\..\\..\\..\\.esy\\3____________________________________________________________________________\\i\\esy_openssl-20afd0e0\\share\\man\\man7\\Ed448.7'
  ../../../.esy/3____________________________________________________________________________/i/esy_openssl-20afd0e0/share/man/man7/X448.7: Can't create '\\\\?\\D:\\a\\dream-web-server-sessions\\dream-web-server-sessions\\..\\..\\..\\.esy\\3____________________________________________________________________________\\i\\esy_openssl-20afd0e0\\share\\man\\man7\\X448.7'
  ../../../.esy/3____________________________________________________________________________/i/esy_openssl-20afd0e0/share/man/man3/ACCESS_DESCRIPTION_free.3: Can't create '\\\\?\\D:\\a\\dream-web-server-sessions\\dream-web-server-sessions\\..\\..\\..\\.esy\\3____________________________________________________________________________\\i\\esy_openssl-20afd0e0\\share\\man\\man3\\ACCESS_DESCRIPTION_free.3'
  ../../../.esy/3____________________________________________________________________________/i/esy_openssl-20afd0e0/share/man/man3/ACCESS_DESCRIPTION_new.3: Can't create '\\\\?\\D:\\a\\dream-web-server-sessions\\dream-web-server-sessions\\..\\..\\..\\.esy\\3____________________________________________________________________________\\i\\esy_openssl-20afd0e0\\share\\man\\man3\\ACCESS_DESCRIPTION_new.3'
  ../../../.esy/3____________________________________________________________________________/i/esy_openssl-20afd0e0/share/man/man3/ADMISSIONS_free.3: Can't create '\\\\?\\D:\\a\\dream-web-server-sessions\\dream-web-server-sessions\\..\\..\\..\\.esy\\3____________________________________________________________________________\\i\\esy_openssl-20afd0e0\\share\\man\\man3\\ADMISSIONS_free.3'
  ../../../.esy/3____________________________________________________________________________/i/esy_openssl-20afd0e0/share/man/man3/ADMISSIONS_get0_admissionAuthority.3: Can't create '\\\\?\\D:\\a\\dream-web-server-sessions\\dream-web-server-sessions\\..\\..\\..\\.esy\\3____________________________________________________________________________\\i\\esy_openssl-20afd0e0\\share\\man\\man3\\ADMISSIONS_get0_admissionAuthority.3'
```
  • Loading branch information
ManasJayanth committed Jun 25, 2024
1 parent e419583 commit a22c6f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176095,7 +176095,10 @@ function main() {
esyPrefix =
esyPrefix && esyPrefix !== ""
? esyPrefix
: external_path_.join(external_os_.homedir(), ".esy");
: external_path_.join(external_path_.dirname(process.env.GITHUB_WORKSPACE ||
process.env.HOME ||
process.env.HOMEPATH ||
"~"), ".esy");
const installPath = [`${esyPrefix}/source`];
const installKey = `source-${index_platform}-${arch}-${sourceCacheKey}`;
core.startGroup("Restoring install cache");
Expand Down
10 changes: 9 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ async function main() {
esyPrefix =
esyPrefix && esyPrefix !== ""
? esyPrefix
: path.join(os.homedir(), ".esy");
: path.join(
path.dirname(
process.env.GITHUB_WORKSPACE ||
process.env.HOME ||
process.env.HOMEPATH ||
"~"
),
".esy"
);
const installPath = [`${esyPrefix}/source`];
const installKey = `source-${platform}-${arch}-${sourceCacheKey}`;
core.startGroup("Restoring install cache");
Expand Down

0 comments on commit a22c6f6

Please sign in to comment.