Browse Source

Test APPDATA variable

pull/143/head
Louis 9 years ago
parent
commit
53e8307759
  1. 2
      .appveyor.yml
  2. 9
      patacrep/__init__.py

2
.appveyor.yml

@ -25,7 +25,7 @@ install:
# Download and install MikTeX # Download and install MikTeX
- ps: "wget http://mirrors.ctan.org/systems/win32/miktex/setup/basic-miktex-2.9.5721.exe -OutFile ./basic-miktex.exe" - ps: "wget http://mirrors.ctan.org/systems/win32/miktex/setup/basic-miktex-2.9.5721.exe -OutFile ./basic-miktex.exe"
- "basic-miktex.exe --unattended" - "basic-miktex.exe --unattended --user-config='<APPDATA>\MiKTeX\2.9' --user-data='<LOCALAPPDATA>\MiKTeX\2.9' --user-install='<APPDATA>\MiKTeX\2.9'"
build: false # Not a C# project, build stuff at the test step instead. build: false # Not a C# project, build stuff at the test step instead.

9
patacrep/__init__.py

@ -31,3 +31,12 @@ print("DEBUG: DIR RESOURCE_FILENAME:", subprocess.check_output(
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,
universal_newlines=True universal_newlines=True
)) ))
print("DEBUG: EXPAND VAR", [(var, os.path.expandvars(var)) for var in ['APPDATA', '$APPDATA', '%APPDATA%', '<APPDATA>']])
try:
print("DEBUG: DIR APPDATA:", subprocess.check_output(
['dir', os.path.expandvars('%APPDATA%')],
stderr=subprocess.STDOUT,
universal_newlines=True
))
except Exception as error:
print(error)

Loading…
Cancel
Save