Skip to content

Commit 8bc7634

Browse files
author
Elijah Wilson
committed
confirm before starting
1 parent 46c3097 commit 8bc7634

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,4 @@ poetry.toml
171171
pyrightconfig.json
172172

173173
.task/
174+
.confirmed-allow-chatgpt-to-run-code-on-my-computer

Taskfile.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,28 @@ vars:
55

66
tasks:
77
serve:
8+
interactive: true
9+
silent: true
810
deps:
911
- install-deps
1012
cmds:
13+
- |
14+
FILE=".confirmed-allow-chatgpt-to-run-code-on-my-computer"
15+
16+
if [ -f "$FILE" ]; then
17+
exit 0
18+
fi
19+
20+
echo "Are you sure you want to proceed? This will allow ChatGPT to execute code on your computer. (y/N)"
21+
read -r REPLY
22+
if [[ $REPLY =~ ^[Yy]$ ]]
23+
then
24+
# if 'Y' or 'y' was entered, the condition is true
25+
touch $FILE
26+
else
27+
echo "Exiting..."
28+
exit 1
29+
fi
1130
- poetry run uvicorn jupychat.main:app --reload --host "0.0.0.0" --port 8000
1231

1332
install-deps:

0 commit comments

Comments
 (0)