Skip to content

Commit

Permalink
[missing-deps-suggest] move buildozer cli to a new line (pantsbuild#6190
Browse files Browse the repository at this point in the history
)

Currently, the buildozer command is on the same line as the rest of the message. This makes it harder to select, particularly when the command is long.

Putting the buildozer command on a new line will make it easier to copy / paste.
  • Loading branch information
baroquebobcat authored and Chris Livingston committed Aug 27, 2018
1 parent 2be7e20 commit 5f8e34a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile.py
Expand Up @@ -599,12 +599,11 @@ def _find_missing_deps(self, compile_logs, target):

path_to_buildozer = self.get_options().buildozer
if path_to_buildozer:
suggestion_msg += ("\nYou can do this by running {buildozer} "
"'add dependencies {deps}' {target}".format(
buildozer=path_to_buildozer,
deps=" ".join(sorted(suggested_deps)),
target=target.address.spec
)
suggestion_msg += ("\nYou can do this by running:\n"
" {buildozer} 'add dependencies {deps}' {target}".format(
buildozer=path_to_buildozer,
deps=" ".join(sorted(suggested_deps)),
target=target.address.spec)
)

self.context.log.info(suggestion_msg)
Expand Down
Expand Up @@ -33,7 +33,7 @@ def test_missing_deps_found_buildozer(self):
'--compile-zinc-buildozer=path/to/buildozer',
])
self.assert_failure(run)
self.assertTrue(re.search("path/to/buildozer 'add dependencies 3rdparty:guava' " + target,
self.assertTrue(re.search("\n *path/to/buildozer 'add dependencies 3rdparty:guava' " + target,
run.stdout_data,
re.DOTALL))

Expand Down

0 comments on commit 5f8e34a

Please sign in to comment.