From 2fddd8803e2f5c9604345a0b591c3020ee971a93 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 13 Jul 2022 16:20:39 +0200 Subject: [PATCH] fixing pnpm output issue (#545) --- dist/cache-save/index.js | 4 ++-- dist/setup/index.js | 4 ++-- src/cache-utils.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index ccd3a5a3a..a79693b2b 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -59931,7 +59931,7 @@ exports.supportedPackageManagers = { }, pnpm: { lockFilePatterns: ['pnpm-lock.yaml'], - getCacheFolderCommand: 'pnpm store path' + getCacheFolderCommand: 'pnpm store path --silent' }, yarn1: { lockFilePatterns: ['yarn.lock'], @@ -59986,7 +59986,7 @@ exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaite throw new Error(`Could not get cache folder path for ${packageManager}`); } core.debug(`${packageManager} path is ${stdOut}`); - return stdOut; + return stdOut.trim(); }); function isGhes() { const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); diff --git a/dist/setup/index.js b/dist/setup/index.js index 801cf3308..28d5dc8fd 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -71277,7 +71277,7 @@ exports.supportedPackageManagers = { }, pnpm: { lockFilePatterns: ['pnpm-lock.yaml'], - getCacheFolderCommand: 'pnpm store path' + getCacheFolderCommand: 'pnpm store path --silent' }, yarn1: { lockFilePatterns: ['yarn.lock'], @@ -71332,7 +71332,7 @@ exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaite throw new Error(`Could not get cache folder path for ${packageManager}`); } core.debug(`${packageManager} path is ${stdOut}`); - return stdOut; + return stdOut.trim(); }); function isGhes() { const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); diff --git a/src/cache-utils.ts b/src/cache-utils.ts index 4db730eb1..ccd4e9876 100644 --- a/src/cache-utils.ts +++ b/src/cache-utils.ts @@ -18,7 +18,7 @@ export const supportedPackageManagers: SupportedPackageManagers = { }, pnpm: { lockFilePatterns: ['pnpm-lock.yaml'], - getCacheFolderCommand: 'pnpm store path' + getCacheFolderCommand: 'pnpm store path --silent' }, yarn1: { lockFilePatterns: ['yarn.lock'], @@ -94,7 +94,7 @@ export const getCacheDirectoryPath = async ( core.debug(`${packageManager} path is ${stdOut}`); - return stdOut; + return stdOut.trim(); }; export function isGhes(): boolean {