Skip to content

Commit 8ef8276

Browse files
committed
auto-accept honesty question when in R studio
1 parent 146cebc commit 8ef8276

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
entry_points={
2727
"console_scripts": ["submit50=submit50.__main__:main"]
2828
},
29-
version="3.1.4",
29+
version="3.1.5",
3030
include_package_data=True
3131
)

submit50/__main__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import enum
44
import gettext
55
import logging
6+
import os
67
import re
78
import shutil
89
import sys
@@ -144,7 +145,11 @@ def prompt(honesty, included, excluded):
144145
honesty_question = str(honesty)
145146

146147
# Get the user's answer
147-
answer = input(honesty_question)
148+
# If in R Studio environment, answer is always yes
149+
if os.getenv("RSTUDIO") == "1":
150+
answer = "yes"
151+
else:
152+
answer = input(honesty_question)
148153
except EOFError:
149154
answer = None
150155
print()

0 commit comments

Comments
 (0)