Skip to content

Commit

Permalink
init: Fix sudo message on Ubuntu
Browse files Browse the repository at this point in the history
Fixes #753
  • Loading branch information
susi committed Aug 20, 2022
1 parent 59e2974 commit b55130d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/init/grass.py
Original file line number Diff line number Diff line change
Expand Up @@ -2039,6 +2039,12 @@ def sh_like_startup(location, location_name, grass_env_file, sh):
""".format(
sh_history=sh_history
)
sudo_success_file = ".sudo_as_admin_successful"
if os.path.exists(os.path.join(userhome, sudo_success_file)):
try:
fh = open(os.path.join(home, sudo_success_file), "a")
finally:
fh.close()

# double curly brackets means single one for format function
# setting LOCATION for backwards compatibility
Expand Down

0 comments on commit b55130d

Please sign in to comment.