Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/inputs/run-install.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getInput, error } from '@actions/core'
import * as yaml from 'yaml'
import { parse as parseYaml } from 'yaml'
import { z, ZodError } from 'zod'

const RunInstallSchema = z.object({
Expand All @@ -20,7 +20,7 @@ export type RunInstall = z.infer<typeof RunInstallSchema>

export function parseRunInstall(inputName: string): RunInstall[] {
const input = getInput(inputName, { required: true })
const parsedInput: unknown = yaml.parse(input)
const parsedInput: unknown = parseYaml(input)

try {
const result: RunInstallInput = RunInstallInputSchema.parse(parsedInput)
Expand Down
4 changes: 2 additions & 2 deletions src/install-pnpm/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import path from 'path'
import { execPath } from 'process'
import util from 'util'
import { Inputs } from '../inputs'
import YAML from 'yaml'
import { parse as parseYaml } from 'yaml'

export async function runSelfInstaller(inputs: Inputs): Promise<number> {
const { version, dest, packageJsonFile, standalone } = inputs
Expand Down Expand Up @@ -63,7 +63,7 @@ async function readTarget(opts: {
try {
const content = readFileSync(path.join(GITHUB_WORKSPACE, packageJsonFile), 'utf8');
({ packageManager } = packageJsonFile.endsWith(".yaml")
? YAML.parse(content, { merge: true })
? parseYaml(content, { merge: true })
: JSON.parse(content)
)
} catch (error: unknown) {
Expand Down
Loading