Skip to content

Commit

Permalink
fix: validate no longer takes files
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Nov 27, 2023
1 parent 885269f commit 864b460
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as core from '@actions/core'
import * as glob from '@actions/glob'
import {downloadFlipt} from './lib/cli'
import {environmentVariables} from './lib/environment'
import {exec} from './lib/exec'
import { downloadFlipt } from './lib/cli'
import { environmentVariables } from './lib/environment'
import { exec } from './lib/exec'

async function run(): Promise<void> {
try {
Expand Down Expand Up @@ -38,12 +38,9 @@ async function validate(args: string[] = []): Promise<void> {

core.startGroup('Running flipt validate')

const globber = await glob.create(`${workspace}/**/*/features.yaml`)
const files = await globber.glob()

const result = await exec(
'flipt',
['validate', files.join(' '), '--issue-exit-code=0', '--format=json'],
['validate', '--issue-exit-code=0', '--format=json'],
false
)

Expand Down Expand Up @@ -74,7 +71,7 @@ async function validate(args: string[] = []): Promise<void> {

for (const error of json.errors) {
errors += 1
const {message, location} = error
const { message, location } = error

// TODO: hack
const file = location.file.replace('/workspace/', '')
Expand Down

0 comments on commit 864b460

Please sign in to comment.