question: what am I doing wrong? #88
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ungleich-public/cdist#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
init manifest:
type code:
cdist-dump -routput after config run:if i uncomment
__fileand run again:why b and c is skipped?
same thing works with
for, but not withwhile.🤷
of course i can
@nico Yee, it's not cdist specific, but it's specific for cdist that types always consume stdin.
Today I became aware of something new :)
mentioned in commit
3c8b470367closed via merge request !784
This is actually not cdist specific, but happens the same way with ssh - i.e. anything that likes to read stdion in a loop that you input stuff in
@steven Thanks! I will update documentation.
We should document this. It's known since forever.
The workaround e.g.:
So make sure your types inside a loop get there stdin from somewhere else.
mentioned in merge request !784
@ander Can you write your solution with
forloop?I think we cannot distinguish such stdin from e.g. heredoc stdin.
Or am I missing something?
@nico @steven We should add this as 'Caveats' to cdist type chapter.
assigned to @poljakowski
@ander @nico @steven Got it!
So, parameter foo file content becomes while body's stdin and when executing first
__filecdist's emulator reads stdin (the rest of foo param file) and saves it tostdinfile (in cdist cache).For the second
readthere is no more lines to read.@ander Look what seems to work:
@ander Interesting.
Currently trying to debug it and not getting it.