1. Eric Larson
  2. xenv

Commits

Eric Larson  committed d4a15e7

The xe command will layer on top of the current env's PATH

  • Participants
  • Parent commits 1d501f9
  • Branches default

Comments (0)

Files changed (1)

File xenv/models.py

View file
         return ':'.join([
                 (self.root / 'usr' / 'bin').abspath(),
                 (self.root / 'local' / 'bin').abspath(),
-                '/bin', '/usr/bin', '/usr/local/bin',
                 ])
 
 
         self.root = self.xenv_fs.root.abspath()
 
     def run(self, cmd):
-        env = {
-            'PATH': self.xenv_fs.path()
-        }
+        env = os.environ.copy()
+        env['PATH'] = self.xenv_fs.path() + ':' + env['PATH']
         try:
             call(cmd, env=env)
         except KeyboardInterrupt: