Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an argument to accept all prompts. #341

Closed
newtewt opened this issue Jul 13, 2020 · 1 comment
Closed

Add an argument to accept all prompts. #341

newtewt opened this issue Jul 13, 2020 · 1 comment

Comments

@newtewt
Copy link
Contributor

newtewt commented Jul 13, 2020

When using medic-conf in scripts it can fail because there is no way to interact with the script. We should find a way to mimic other CLI tools by passing a -y arg or something to automatically accept prompts.

stty: when specifying an output style, modes may not be set                                                                         /usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/read.sh: 
49: /usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/read.sh: cannot create /dev/tty: No such device or address                                                                
 stty: invalid argument ‘-f’                                                                                                         
Try 'stty --help' for more information.                                                                                             
ERROR Error: The current environment doesn't support interactive reading from TTY.                                                 
 stty: when specifying an output style, modes may not be set                                                                         /usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/read.sh: 49: /usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/read.sh: cannot create /dev/tty: No such device or address                                                                 stty: invalid argument ‘-f’                                                                                                         Try 'stty --help' for more information.                                                                                                 at readlineExt (/usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/readline-sync.js:221:19)                            at tryExt (/usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/readline-sync.js:258:15)                                 at /usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/readline-sync.js:363:15                                          at _readlineSync (/usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/readline-sync.js:433:5)                           at Object.exports.keyIn (/usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/readline-sync.js:901:17)                   at Object.exports.keyInSelect (/usr/lib/node_modules/medic-conf/node_modules/readline-sync/lib/readline-sync.js:1314:24)            at Object.preUploadDoc (/usr/lib/node_modules/medic-conf/src/lib/warn-upload-overwrite.js:143:26)                                   at process._tickCallback (internal/process/next_tick.js:68:7)     

@newtewt
Copy link
Contributor Author

newtewt commented Jul 13, 2020

Closed as duplicate

#307

@newtewt newtewt closed this as completed Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant