We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
repro: --all-pipelines doesn't do anything.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dvc/command/repro.py`
Content:
```
1 import os
2 
3 from dvc.command.base import CmdBase
4 from dvc.command.status import CmdDataStatus
5 from dvc.exceptions import DvcException
6 
7 
8 class CmdRepro(CmdBase):
9     def run(self):
10         recursive = not self.args.single_item
11         saved_dir = os.path.realpath(os.curdir)
12         if self.args.cwd:
13             os.chdir(self.args.cwd)
14 
15         ret = 0
16         for target in self.args.targets:
17             try:
18                 stages = self.project.reproduce(
19                                target,
20                                recursive=recursive,
21                                force=self.args.force,
22                                dry=self.args.dry,
23                                interactive=self.args.interactive,
24                                pipeline=self.args.pipeline,
25                                all_pipelines=self.args.all_pipelines,
26                                ignore_build_cache=self.args.ignore_build_cache)
27 
28                 if len(stages) == 0:
29                     self.project.logger.info(CmdDataStatus.UP_TO_DATE_MSG)
30 
31                 if self.args.metrics:
32                     self.project.metrics_show()
33             except DvcException as ex:
34                 msg = 'Failed to reproduce \'{}\''.format(target)
35                 self.project.logger.error(msg, ex)
36                 ret = 1
37                 break
38 
39         os.chdir(saved_dir)
40         return ret
41
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/dvc/command/repro.py b/dvc/command/repro.py
--- a/dvc/command/repro.py
+++ b/dvc/command/repro.py
@@ -12,6 +12,10 @@
         if self.args.cwd:
             os.chdir(self.args.cwd)
 
+        # Dirty hack so the for loop below can at least enter once
+        if self.args.all_pipelines:
+            self.args.targets = [None]
+
         ret = 0
         for target in self.args.targets:
             try:

{"golden_diff": "diff --git a/dvc/command/repro.py b/dvc/command/repro.py\n--- a/dvc/command/repro.py\n+++ b/dvc/command/repro.py\n@@ -12,6 +12,10 @@\n         if self.args.cwd:\n             os.chdir(self.args.cwd)\n \n+        # Dirty hack so the for loop below can at least enter once\n+        if self.args.all_pipelines:\n+            self.args.targets = [None]\n+\n         ret = 0\n         for target in self.args.targets:\n             try:\n", "issue": "repro: --all-pipelines doesn't do anything.\n\n", "before_files": [{"content": "import os\n\nfrom dvc.command.base import CmdBase\nfrom dvc.command.status import CmdDataStatus\nfrom dvc.exceptions import DvcException\n\n\nclass CmdRepro(CmdBase):\n    def run(self):\n        recursive = not self.args.single_item\n        saved_dir = os.path.realpath(os.curdir)\n        if self.args.cwd:\n            os.chdir(self.args.cwd)\n\n        ret = 0\n        for target in self.args.targets:\n            try:\n                stages = self.project.reproduce(\n                               target,\n                               recursive=recursive,\n                               force=self.args.force,\n                               dry=self.args.dry,\n                               interactive=self.args.interactive,\n                               pipeline=self.args.pipeline,\n                               all_pipelines=self.args.all_pipelines,\n                               ignore_build_cache=self.args.ignore_build_cache)\n\n                if len(stages) == 0:\n                    self.project.logger.info(CmdDataStatus.UP_TO_DATE_MSG)\n\n                if self.args.metrics:\n                    self.project.metrics_show()\n            except DvcException as ex:\n                msg = 'Failed to reproduce \\'{}\\''.format(target)\n                self.project.logger.error(msg, ex)\n                ret = 1\n                break\n\n        os.chdir(saved_dir)\n        return ret\n", "path": "dvc/command/repro.py"}], "after_files": [{"content": "import os\n\nfrom dvc.command.base import CmdBase\nfrom dvc.command.status import CmdDataStatus\nfrom dvc.exceptions import DvcException\n\n\nclass CmdRepro(CmdBase):\n    def run(self):\n        recursive = not self.args.single_item\n        saved_dir = os.path.realpath(os.curdir)\n        if self.args.cwd:\n            os.chdir(self.args.cwd)\n\n        # Dirty hack so the for loop below can at least enter once\n        if self.args.all_pipelines:\n            self.args.targets = [None]\n\n        ret = 0\n        for target in self.args.targets:\n            try:\n                stages = self.project.reproduce(\n                               target,\n                               recursive=recursive,\n                               force=self.args.force,\n                               dry=self.args.dry,\n                               interactive=self.args.interactive,\n                               pipeline=self.args.pipeline,\n                               all_pipelines=self.args.all_pipelines,\n                               ignore_build_cache=self.args.ignore_build_cache)\n\n                if len(stages) == 0:\n                    self.project.logger.info(CmdDataStatus.UP_TO_DATE_MSG)\n\n                if self.args.metrics:\n                    self.project.metrics_show()\n            except DvcException as ex:\n                msg = 'Failed to reproduce \\'{}\\''.format(target)\n                self.project.logger.error(msg, ex)\n                ret = 1\n                break\n\n        os.chdir(saved_dir)\n        return ret\n", "path": "dvc/command/repro.py"}]}