Bug 1432222 - Actually default cargo check to gkrust when invoked without any crate arguments. r?froydnj draft
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 22 Jan 2018 12:40:28 -0500
changeset 723188 cb3ba70fb68511327b4ad63f8afad77ce93498fe
parent 723009 5faab9e619901b1513fd4ca137747231be550def
child 746790 74014b991f2c2223d4c1e2fbc95256782a823443
push id96352
push userkgupta@mozilla.com
push dateMon, 22 Jan 2018 17:40:51 +0000
reviewersfroydnj
bugs1432222
milestone59.0a1
Bug 1432222 - Actually default cargo check to gkrust when invoked without any crate arguments. r?froydnj MozReview-Commit-ID: JIgippNiBP
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -281,17 +281,17 @@ class CargoProvider(MachCommandBase):
         crates_and_roots = {
             'gkrust': 'toolkit/library/rust',
             'gkrust-gtest': 'toolkit/library/gtest/rust',
             'js': 'js/rust',
             'mozjs_sys': 'js/src',
             'geckodriver': 'testing/geckodriver',
         }
 
-        if crates == None:
+        if crates == None or crates == []:
             crates = ['gkrust']
 
         for crate in crates:
             root = crates_and_roots.get(crate, None)
             if not root:
                 print('Cannot locate crate %s.  Please check your spelling or '
                       'add the crate information to the list.' % crate)
                 return 1