From 9eb14dd77ccedda9274df9cb45ab296ed965210e Mon Sep 17 00:00:00 2001
From: Zoltan Kochan <z@kochan.io>
Date: Tue, 8 Feb 2022 14:44:50 +0200
Subject: [PATCH] decrease bundle size

---
 src/install-pnpm/run.ts | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/install-pnpm/run.ts b/src/install-pnpm/run.ts
index b487b6b..5395663 100644
--- a/src/install-pnpm/run.ts
+++ b/src/install-pnpm/run.ts
@@ -1,7 +1,7 @@
-import * as core from '@actions/core'
+import { addPath, exportVariable } from '@actions/core'
 import { spawn } from 'child_process'
 import { execPath } from 'process'
-import { join } from 'path'
+import path from 'path'
 import { remove, ensureFile, writeFile } from 'fs-extra'
 import fetch from 'node-fetch'
 import { Inputs } from '../inputs'
@@ -9,7 +9,7 @@ import { Inputs } from '../inputs'
 export async function runSelfInstaller(inputs: Inputs): Promise<number> {
   const { version, dest } = inputs
   const target = version ? `pnpm@${version}` : 'pnpm'
-  const pkgJson = join(dest, 'package.json')
+  const pkgJson = path.join(dest, 'package.json')
 
   await remove(dest)
   await ensureFile(pkgJson)
@@ -28,9 +28,9 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
     cp.on('close', resolve)
   })
   if (exitCode === 0) {
-    const pnpmHome = join(dest, 'node_modules/.bin')
-    core.addPath(pnpmHome)
-    core.exportVariable('PNPM_HOME', pnpmHome)
+    const pnpmHome = path.join(dest, 'node_modules/.bin')
+    addPath(pnpmHome)
+    exportVariable('PNPM_HOME', pnpmHome)
   }
   return exitCode
 }