Skip to content

Commit

Permalink
Reference documentation when cache path is missing.
Browse files Browse the repository at this point in the history
Fixes NSL-3744
  • Loading branch information
n-g committed Jul 31, 2024
1 parent b0200e1 commit 402755b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dist/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27217,7 +27217,11 @@ void main();
async function main() {
const localCachePath = process.env[Env_CacheRoot];
if (localCachePath == null) {
throw new Error("Local cache not found. Did you configure the runs-on labels to enable Namespace cross-invocation cache?");
throw new Error(`Local cache path not found.

Did you configure the Namespace cross-invocation cache? https://namespace.so/docs/features/faster-github-actions#using-a-cache-volume

Are you running in a container? Check out https://namespace.so/docs/actions/nscloud-cache-action#advanced-running-github-jobs-in-containers`);
}
core.info(`Found Namespace cross-invocation cache at ${localCachePath}.`);
const cachePaths = await resolveCachePaths(localCachePath);
Expand Down
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ async function main() {
const localCachePath = process.env[utils.Env_CacheRoot];
if (localCachePath == null) {
throw new Error(
"Local cache not found. Did you configure the runs-on labels to enable Namespace cross-invocation cache?"
`Local cache path not found.
Did you configure the Namespace cross-invocation cache? https://namespace.so/docs/features/faster-github-actions#using-a-cache-volume
Are you running in a container? Check out https://namespace.so/docs/actions/nscloud-cache-action#advanced-running-github-jobs-in-containers`
);
}
core.info(`Found Namespace cross-invocation cache at ${localCachePath}.`);
Expand Down

0 comments on commit 402755b

Please sign in to comment.