Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed Feb 23, 2022
1 parent 847a737 commit 11ba342
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 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'

Expand Down
6 changes: 3 additions & 3 deletions 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 {
Expand Down
6 changes: 3 additions & 3 deletions src/install-pnpm/run.ts
@@ -1,9 +1,9 @@
import { addPath, exportVariable } from '@actions/core'
import fetch from '@pnpm/fetch'
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 path from 'path'
import { execPath } from 'process'
import { Inputs } from '../inputs'

export async function runSelfInstaller(inputs: Inputs): Promise<number> {
Expand Down
2 changes: 1 addition & 1 deletion 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'

Expand Down
4 changes: 2 additions & 2 deletions 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'

Expand All @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions 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,
})

0 comments on commit 11ba342

Please sign in to comment.