fix(#1357): Gracefully handle missing pnpm installation during cache by Satishchoudhary94 · Pull Request #1478 · actions/setup-node

@Satishchoudhary94

@Satishchoudhary94

… cache

This change prevents the action from failing immediately when pnpm is specified
in packageManager but not yet installed (e.g., when using corepack).

Changes:
- Add isPackageManagerInstalled() function to check if a package manager exists
- Update restoreCache to skip caching with a warning if package manager not found
- Update cachePackages to skip cache save with a warning if package manager not found
- This allows workflows to continue instead of failing
- Users can either install pnpm first or disable caching with package-manager-cache: false

Fixes actions#1357
Related: actions#1357