You could try expect
, which lets you automate interactive console applications.
Thanks, this ended up working:
expect -c 'spawn pijul key generate test ; expect "Password for the new key (press enter to leave it unencrypted):" ; send -- "\r" ; expect eof'
It would be great to see some option for this, either --no-password
or --password ''
.
I’m trying to set up a dummy Pijul repository as part of a GitHub workflow’s test phase (so I can test Pijul integration in a CLI tool). Since every workflow runs in a fresh environment, I need to run
pijul key generate foo
, but it requires interaction. I tried working around it withprintf
, but no luck:Is there any way around this right now?