dvc run messes up library paths
I have a command that relies on `cupy`. When I run it with `dvc run ...`, it raises this error and fails:
```bash
/tmp/_MEIeW2y4B/libstdc++.so.6: version `GLIBCXX_3.4.20' not found
```
If I run it without `dvc run`, no error is raised. I think this is b/c dvc run uses `p = subprocess.Popen(self.cmd, cwd=self.cwd, shell=True)` and it's messing up the environment variables. Would passing in the environment variables solve this problem?
```python
env = os.environ
proc = subprocess.Popen(args, env=env)
```
diff --git a/dvc/stage.py b/dvc/stage.py
index 86e5f5ab7..d5a926e5f 100644
--- a/dvc/stage.py
+++ b/dvc/stage.py
@@ -226,7 +226,11 @@ class Stage(object):
         if not self.is_data_source:
             self.project.logger.info(u'Reproducing \\'{}\\':\\n\\t{}'.format(self.relpath, self.cmd))
 
-            p = subprocess.Popen(self.cmd, cwd=self.cwd, shell=True)
+            p = subprocess.Popen(self.cmd,
+                                 cwd=self.cwd,
+                                 shell=True,
+                                 env=os.environ,
+                                 executable=os.getenv('SHELL'))
             p.communicate()
             if p.returncode != 0:
                raise StageCmdFailedError(self)
diff --git a/tests/test_repro.py b/tests/test_repro.py
index 9ee5d052e..3b9b2ce16 100644
--- a/tests/test_repro.py
+++ b/tests/test_repro.py
@@ -297,3 +297,26 @@ class TestReproExternalGS(TestReproExternalBase):
         client = gc.Client()
         bucket = client.bucket(bucket)
         bucket.blob(key).upload_from_string(body)
+
+
+class TestReproShell(TestDvc):
+    def test(self):
+        if os.name == 'nt':
+            return
+
+        fname = 'shell.txt'
+        stage = fname + '.dvc'
+
+        self.dvc.run(fname=stage,
+                     outs=[fname],
+                     cmd='echo $SHELL > {}'.format(fname))
+
+        with open(fname, 'r') as fd:
+            self.assertEqual(os.getenv('SHELL'), fd.read().strip())
+
+        os.unlink(fname)
+
+        self.dvc.reproduce(stage)
+
+        with open(fname, 'r') as fd:
+            self.assertEqual(os.getenv('SHELL'), fd.read().strip())
['tests/test_repro.py', 'dvc/stage.py']