mirror of
https://github.com/actions/setup-node
synced 2025-04-09 18:35:51 +00:00
Apply change request fixes
This commit is contained in:
parent
02b94f2c87
commit
813556063c
3 changed files with 3149 additions and 3904 deletions
3520
dist/cache-save/index.js
vendored
3520
dist/cache-save/index.js
vendored
File diff suppressed because it is too large
Load diff
3520
dist/setup/index.js
vendored
3520
dist/setup/index.js
vendored
File diff suppressed because it is too large
Load diff
|
@ -61,13 +61,15 @@ export const getPackageManagerWorkingDir = (): string | null => {
|
|||
return cacheDependencyPath ? path.dirname(cacheDependencyPath) : null;
|
||||
};
|
||||
|
||||
export const getPackageManagerCommandOutput = (command: string) =>
|
||||
getCommandOutput(command, getPackageManagerWorkingDir());
|
||||
|
||||
export const getPackageManagerVersion = async (
|
||||
packageManager: string,
|
||||
command: string
|
||||
) => {
|
||||
const stdOut = await getCommandOutput(
|
||||
`${packageManager} ${command}`,
|
||||
getPackageManagerWorkingDir()
|
||||
const stdOut = await getPackageManagerCommandOutput(
|
||||
`${packageManager} ${command}`
|
||||
);
|
||||
|
||||
if (!stdOut) {
|
||||
|
@ -101,9 +103,8 @@ export const getCacheDirectoryPath = async (
|
|||
packageManagerInfo: PackageManagerInfo,
|
||||
packageManager: string
|
||||
) => {
|
||||
const stdOut = await getCommandOutput(
|
||||
packageManagerInfo.getCacheFolderCommand,
|
||||
getPackageManagerWorkingDir()
|
||||
const stdOut = await getPackageManagerCommandOutput(
|
||||
packageManagerInfo.getCacheFolderCommand
|
||||
);
|
||||
|
||||
if (!stdOut) {
|
||||
|
|
Loading…
Add table
Reference in a new issue