diff -r c1ed2c967fac -r 769cd5703b2c rust/hgcli/pyoxidizer.bzl --- a/rust/hgcli/pyoxidizer.bzl Thu Aug 26 09:49:09 2021 +0200 +++ b/rust/hgcli/pyoxidizer.bzl Thu Aug 26 11:04:14 2021 -0400 @@ -47,14 +47,16 @@ # Add user site to sys.path to load extensions without the full path if os.name == 'nt': vi = sys.version_info - sys.path.append( - os.path.join( - os.environ['APPDATA'], - 'Python', - 'Python%d%d' % (vi[0], vi[1]), - 'site-packages', + appdata = os.environ.get('APPDATA') + if appdata: + sys.path.append( + os.path.join( + appdata, + 'Python', + 'Python%d%d' % (vi[0], vi[1]), + 'site-packages', + ) ) - ) import hgdemandimport; hgdemandimport.enable(); from mercurial import dispatch;