add windows support when creating nim-log.txt
This commit is contained in:
parent
597cca20eb
commit
89f0a10aa3
1 changed files with 7 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import threading, Queue, subprocess, signal, os
|
import threading, Queue, subprocess, signal, os, platform, getpass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import vim
|
import vim
|
||||||
|
|
@ -75,7 +75,12 @@ def nimRestartService(project):
|
||||||
nimTerminateService(project)
|
nimTerminateService(project)
|
||||||
nimStartService(project)
|
nimStartService(project)
|
||||||
|
|
||||||
NimLog = open("/tmp/nim-log.txt", "w")
|
NimLog = None
|
||||||
|
if platform.system() == 'Windows':
|
||||||
|
user = getpass.getuser()
|
||||||
|
NimLog = open("C:\\Users\\%s\\AppData\\Local\\Temp\\nim-log.txt" % (user,), "w")
|
||||||
|
else:
|
||||||
|
NimLog = open("/tmp/nim-log.txt", "w")
|
||||||
|
|
||||||
def nimExecCmd(project, cmd, async = True):
|
def nimExecCmd(project, cmd, async = True):
|
||||||
target = None
|
target = None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue