diff options
author | Nathan Wilcox <inoshiro@lindenlab.com> | 2010-01-11 12:30:27 -0800 |
---|---|---|
committer | Nathan Wilcox <inoshiro@lindenlab.com> | 2010-01-11 12:30:27 -0800 |
commit | 2d337ca8c6b05ecd7e8d4a8f0c3d88fabcc5bcbc (patch) | |
tree | 216ee6b0bba6d15ff5cf7e10ec5df5f72a172616 /indra/develop.py | |
parent | 33df069238130a9e8c02a2aadcd41956780397db (diff) |
DEV-44838 - See if buildconsole is confused by having the absolute path (with spaces) in the commandline. To accomplish this we put relative paths in the command string but lookup the absolute path for the executable parameter.
Diffstat (limited to 'indra/develop.py')
-rwxr-xr-x | indra/develop.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/indra/develop.py b/indra/develop.py index 897fbb6544..b8fdd1a815 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -574,7 +574,7 @@ class WindowsSetup(PlatformSetup): if self.gens[self.generator]['ver'] in [ r'8.0', r'9.0' ]: config = '\"%s|Win32\"' % config - executable = self.find_in_path('buildconsole')[0] + executable = 'buildconsole' cmd = "%(bin)s %(prj)s.sln /build /cfg=%(cfg)s" % {'prj': self.project_name, 'cfg': config, 'bin': executable} return (executable, cmd) @@ -587,18 +587,17 @@ class WindowsSetup(PlatformSetup): def run(self, command, name=None, retry_on=None, retries=1): '''Run a program. If the program fails, raise an exception.''' assert name is not None, 'On windows an executable path must be given in name.' - if not os.path.isfile(name): - name = self.find_in_path(name)[0] + if os.path.isfile(name): + path = name + else: + path = self.find_in_path(name)[0] while retries: retries = retries - 1 print "develop.py tries to run:", command - ret = subprocess.call(command, executable=name) + ret = subprocess.call(command, executable=path) print "got ret", ret, "from", command if ret: - if not name: - error = 'was not found' - else: - error = 'exited with status %d' % ret + error = 'exited with status %d' % ret if retry_on is not None and retry_on == ret: print "Retrying... the command %r %s" % (name, error) else: |