mirror of
https://gitea.com/actions/setup-node.git
synced 2025-07-13 15:17:09 +08:00
Move existence check to cache-save
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as exec from '@actions/exec';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
|
||||
@ -98,11 +97,5 @@ export const getCacheDirectoryPath = async (
|
||||
|
||||
core.debug(`${packageManager} path is ${stdOut}`);
|
||||
|
||||
if (!fs.existsSync(stdOut)) {
|
||||
throw new Error(
|
||||
`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${stdOut}`
|
||||
);
|
||||
}
|
||||
|
||||
return stdOut;
|
||||
};
|
||||
|
Reference in New Issue
Block a user