Skip to content

Commit

Permalink
Dont use exist_ok in the bootstrap script as it might be run with pyt…
Browse files Browse the repository at this point in the history
…hon2 where it doesnt exist
  • Loading branch information
kovidgoyal committed Jul 12, 2023
1 parent 97b073f commit da83302
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion shell-integration/ssh/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import base64
import contextlib
import errno
import io
import json
import os
Expand Down Expand Up @@ -146,7 +147,11 @@ def compile_terminfo(base):
tname = '.terminfo'
q = os.path.join(base, tname, '78', 'xterm-kitty')
if not os.path.exists(q):
os.makedirs(os.path.dirname(q), exist_ok=True)
try:
os.makedirs(os.path.dirname(q))
except EnvironmentError as e:
if e.errno != errno.EEXIST:
raise
os.symlink('../x/xterm-kitty', q)
if os.path.exists('/usr/share/misc/terminfo.cdb'):
# NetBSD requires this
Expand Down

0 comments on commit da83302

Please sign in to comment.