File tree Expand file tree Collapse file tree 4 files changed +34
-5
lines changed Expand file tree Collapse file tree 4 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -318,8 +318,9 @@ def main(context: dict[str, str]) -> int:
318318
319319### colima
320320
321- Since devenv 1.14.0, colima (and the docker CLI needed to interact with it) should have been installed globally for you during bootstrap.
322- If you're on an older version, run ` devenv update ` twice to get global colima.
321+ Since devenv 1.14.0, colima (and the docker CLI needed to interact with it)
322+ should have been installed globally for you during bootstrap.
323+ If you're on an older version, run ` devenv update ` .
323324
324325
325326### gcloud
Original file line number Diff line number Diff line change 66import pwd
77import typing
88
9+ troubleshooting_help = """\
10+ ===============
11+ Troubleshooting
12+ ===============
13+
14+ Problem? First try running `devenv doctor`.
15+ If that doesn't help, then proceed:
16+
17+ Internal living doc (more up-to-date):
18+ https://www.notion.so/sentry/devenv-troubleshooting-1448b10e4b5d8080ba04f452e33de48d
19+
20+ Public doc:
21+ https://develop.sentry.dev/development-infrastructure/environment/#troubleshooting
22+ """
23+
924version = importlib .metadata .version ("sentry_devenv" )
1025
1126CI = os .getenv ("CI" )
Original file line number Diff line number Diff line change 1212from devenv import sync
1313from devenv import update
1414from devenv .constants import home
15+ from devenv .constants import troubleshooting_help
1516from devenv .constants import user
1617from devenv .constants import version
1718from devenv .lib .config import read_config
@@ -51,7 +52,10 @@ def devenv(argv: Sequence[str], config_path: str) -> ExitCode:
5152
5253 # TODO: Search for modules in work repo
5354
54- parser = argparse .ArgumentParser ()
55+ parser = argparse .ArgumentParser (
56+ formatter_class = argparse .RawDescriptionHelpFormatter ,
57+ epilog = troubleshooting_help ,
58+ )
5559 parser .add_argument ("--version" , action = "version" , version = version )
5660 subparser = parser .add_subparsers (
5761 title = argparse .SUPPRESS ,
@@ -62,7 +66,12 @@ def devenv(argv: Sequence[str], config_path: str) -> ExitCode:
6266
6367 for info in modinfo_list :
6468 # Argparse stuff
65- subparser .add_parser (info .command , help = info .help )
69+ subparser .add_parser (
70+ info .command ,
71+ help = info .help ,
72+ formatter_class = argparse .RawDescriptionHelpFormatter ,
73+ epilog = troubleshooting_help ,
74+ )
6675
6776 if len (argv ) == 1 :
6877 parser .print_help ()
Original file line number Diff line number Diff line change 55import os
66from collections .abc import Sequence
77
8+ from devenv .constants import troubleshooting_help
89from devenv .lib .context import Context
910from devenv .lib .modules import DevModuleInfo
1011from devenv .lib .modules import require_repo
@@ -35,7 +36,10 @@ def main(context: Context, argv: Sequence[str] | None = None) -> int:
3536 }
3637
3738 with contextlib .chdir (repo .path ):
38- return module .main (context_compat ) # type: ignore
39+ rc = module .main (context_compat )
40+ if rc != 0 :
41+ print (troubleshooting_help )
42+ return rc # type: ignore
3943
4044
4145module_info = DevModuleInfo (
You can’t perform that action at this time.
0 commit comments