Skip to content

Commit

Permalink
fix(src): improve manifestData check
Browse files Browse the repository at this point in the history
  • Loading branch information
manushak committed Jul 16, 2024
1 parent 179238c commit e609d0c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/if-csv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ const IfCsv = async () => {
const pipedManifest = await parseManifestFromStdin();
const {manifest, output, params} = await parseIfCsvArgs();
const resolvedManifest = manifest || pipedManifest;
let manifestData: Manifest;

if (resolvedManifest) {
if (pipedManifest) {
manifestData = (await YAML.load(pipedManifest!)) as Manifest;
} else {
manifestData = await getManifestData(manifest!);
}
const manifestData = pipedManifest
? ((await YAML.load(pipedManifest!)) as Manifest)
: await getManifestData(manifest!);

const options: CsvOptions = {
tree: manifestData.tree,
Expand Down

0 comments on commit e609d0c

Please sign in to comment.