Skip to content

Commit

Permalink
Skip provided fields in create
Browse files Browse the repository at this point in the history
Fixes #143
  • Loading branch information
jmattheis committed Oct 2, 2020
1 parent 564f99b commit a1c3dc9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions changelog/143-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
type: change
issue: 143
audience: user
components:
- cli
---
# Skip provided fields in `snage create`
2 changes: 1 addition & 1 deletion packages/snage/src/util/interactive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as O from 'fp-ts/lib/Option';

export const askForMissingValues = (fields: Field[]) => (values: NoteValues): TE.TaskEither<string, NoteValues> => {
const existing = Object.keys(values);
const missingFields = fields.filter((f) => !existing.includes(f.name));
const missingFields = fields.filter((f) => !existing.includes(f.name) && !f.provided);
return pipe(
A.array.traverse(TE.taskEitherSeq)(missingFields, (f) => askValueTuple(f)),
TE.map(A.filterMap((x) => x)),
Expand Down

0 comments on commit a1c3dc9

Please sign in to comment.