Question
How to allow terminal commands to be executed without confirmation?
Answer
When Junie is working in "Code" mode, it uses various terminal commands during working steps to create final result. Some of them can be executed without confirmation (like "ls -la", "pwd" - commands that are used to view something which don't change state of files), however some of them like "mkdir", "touch" require additional approval. If you are not working in "Brave mode" (which approves every Junie action without additional confirmation), you need to either approve these commands manually or use specified Junie allowlist:
In your IDE, open Settings | Tools | Junie | Action Allowlist. Here you can set rules by your own.
Or you can run a Junie prompt and while Junie asks you for permission to run a terminal command, catch it and add it through three dots menu.
Difference between options above - "Add command to the Allowlist" adds exact command as it is to allowlist (so "mkdir tmp" will not need approval but "mkdir temp" will still need it - exact regex is ^\Qmkdir tmp\E$ ), while "Add similar commands to the Allowlist" reduces the last parameter from regex and only "mkdir *" will be mentioned in the list. (exact regex is ^\Qmkdir \E\S+$ )
After adding allowlist rule, you can check if terminal commands passes the rule by using "Check Command" feature in tool configuration:
Comments
0 comments
Please sign in to leave a comment.