diff --git a/dist/index.js b/dist/index.js index ca73795..440697a 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/src/index.ts b/src/index.ts index ecea472..7ae741b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import { setFailed, saveState, getState } from '@actions/core' import getInputs from './inputs' -import setOutputs from './outputs' import installPnpm from './install-pnpm' +import setOutputs from './outputs' import pnpmInstall from './pnpm-install' import pruneStore from './pnpm-store-prune' diff --git a/src/inputs/run-install.ts b/src/inputs/run-install.ts index a24ed3d..7914110 100644 --- a/src/inputs/run-install.ts +++ b/src/inputs/run-install.ts @@ -1,7 +1,7 @@ -import process from 'process' -import { load } from 'js-yaml' -import Ajv from 'ajv' import { getInput, error, InputOptions } from '@actions/core' +import Ajv from 'ajv' +import { load } from 'js-yaml' +import process from 'process' import runInstallSchema from './run-install-input.schema.json' export interface RunInstall { diff --git a/src/install-pnpm/run.ts b/src/install-pnpm/run.ts index 0798190..2a31920 100644 --- a/src/install-pnpm/run.ts +++ b/src/install-pnpm/run.ts @@ -1,9 +1,9 @@ import { addPath, exportVariable } from '@actions/core' -import { spawn } from 'child_process' -import { execPath } from 'process' -import path from 'path' -import { remove, ensureFile, writeFile, readFile } from 'fs-extra' import fetch from '@pnpm/fetch' +import { spawn } from 'child_process' +import { remove, ensureFile, writeFile, readFile } from 'fs-extra' +import path from 'path' +import { execPath } from 'process' import { Inputs } from '../inputs' export async function runSelfInstaller(inputs: Inputs): Promise { diff --git a/src/pnpm-install/index.ts b/src/pnpm-install/index.ts index 821e114..a3188ad 100644 --- a/src/pnpm-install/index.ts +++ b/src/pnpm-install/index.ts @@ -1,5 +1,5 @@ -import { spawnSync } from 'child_process' import { setFailed, startGroup, endGroup } from '@actions/core' +import { spawnSync } from 'child_process' import { Inputs } from '../inputs' import { patchPnpmEnv } from '../utils' diff --git a/src/pnpm-store-prune/index.ts b/src/pnpm-store-prune/index.ts index 792552a..5b1a2dd 100644 --- a/src/pnpm-store-prune/index.ts +++ b/src/pnpm-store-prune/index.ts @@ -1,5 +1,5 @@ -import { spawnSync } from 'child_process' import { warning, startGroup, endGroup } from '@actions/core' +import { spawnSync } from 'child_process' import { Inputs } from '../inputs' import { patchPnpmEnv } from '../utils' @@ -13,7 +13,7 @@ export function pruneStore(inputs: Inputs) { const { error, status } = spawnSync('pnpm', ['store', 'prune'], { stdio: 'inherit', shell: true, - env: patchPnpmEnv(inputs) + env: patchPnpmEnv(inputs), }) endGroup() diff --git a/src/utils/index.ts b/src/utils/index.ts index b8f1b71..efc5ea1 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,10 +1,10 @@ -import process from 'process' import path from 'path' +import process from 'process' import { Inputs } from '../inputs' export const getBinDest = (inputs: Inputs): string => path.join(inputs.dest, 'node_modules', '.bin') export const patchPnpmEnv = (inputs: Inputs): NodeJS.ProcessEnv => ({ ...process.env, - PATH: getBinDest(inputs) + path.delimiter + process.env.PATH + PATH: getBinDest(inputs) + path.delimiter + process.env.PATH, })