You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using yq in a C program to covert YAML to json using the command yq ea '[.]' -o=json .cache/BT_nginx-ingress.yaml > .cache/package.json. However this causes an error.
Error: write /dev/stdout: permission denied
I use system() to run the command, and while yq works from the terminal, I get an error in this case. I have tried using yq to output to stdout i.e. the terminal and this works fine, even from within the C program, but redirecting the output fails. I have several other redirections in my program but this is the only case where it fails. All paths and file/directory rights are also fine. Can someone please help me with this? Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using yq in a C program to covert YAML to json using the command
yq ea '[.]' -o=json .cache/BT_nginx-ingress.yaml > .cache/package.json
. However this causes an error.I use system() to run the command, and while yq works from the terminal, I get an error in this case. I have tried using yq to output to stdout i.e. the terminal and this works fine, even from within the C program, but redirecting the output fails. I have several other redirections in my program but this is the only case where it fails. All paths and file/directory rights are also fine. Can someone please help me with this? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions