Allow ae run to execute schematic installed binaries

This commit is contained in:
R. Tyler Croy 2017-01-24 20:40:19 -08:00
parent 057ea5697b
commit 4a13f922cb
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 3 additions and 1 deletions

4
bin/ae
View File

@ -130,6 +130,9 @@ def run():
env = {}
for e in os.environ:
env[e] = os.environ[e]
# Put our own ROOT_DIR bits in the path first to make sure `ae run` can execute
# schematic installed binaries
env['PATH'] = ':'.join([os.path.join(ROOT_DIR, 'bin'), os.environ['PATH']])
project_path = os.path.join(ROOT_DIR, 'lib', 'gnat')
key = 'ADA_PROJECT_PATH'
@ -152,7 +155,6 @@ def run():
env[key] = ':'.join([include_path, os.environ[key]])
else:
env[key] = include_path
return os.execvpe(sys.argv[2], sys.argv[2:], env)