diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-01-18 08:09:59 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-18 08:09:59 -0600 |
commit | d11886e9a12c2ef7262e34de3de7595005a66080 (patch) | |
tree | 19164275b67a50622227222d38f34c00e189927d /python/servo | |
parent | aee0d694cc077d4694fc3114af3a2ad83e326cbf (diff) | |
parent | ebf8348aa2d084b1afab074bd1011d95fb3332f6 (diff) | |
download | servo-d11886e9a12c2ef7262e34de3de7595005a66080.tar.gz servo-d11886e9a12c2ef7262e34de3de7595005a66080.zip |
Auto merge of #19713 - tigercosmos:r1, r=jdm
auto clean cache in build bot
<!-- Please describe your changes on the following line: -->
auto clean cache in build bot
once this merged, servo/saltfs#321 should be closed
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #19712 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19713)
<!-- Reviewable:end -->
Diffstat (limited to 'python/servo')
-rw-r--r-- | python/servo/bootstrap_commands.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index ccc971e5b57..90391785698 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -169,10 +169,7 @@ class MachCommands(CommandBase): @CommandArgument('--keep', default='1', help='Keep up to this many most recent dependencies') - @CommandArgument('--custom-path', '-c', - action='store_true', - help='Get Cargo path from CARGO_HOME environment variable') - def clean_cargo_cache(self, force=False, show_size=False, keep=None, custom_path=False): + def clean_cargo_cache(self, force=False, show_size=False, keep=None): def get_size(path): if os.path.isfile(path): return os.path.getsize(path) / (1024 * 1024.0) @@ -189,7 +186,7 @@ class MachCommands(CommandBase): 'git': {}, } import toml - if os.environ.get("CARGO_HOME", "") and custom_path: + if os.environ.get("CARGO_HOME", ""): cargo_dir = os.environ.get("CARGO_HOME") else: cargo_dir = path.join(self.context.topdir, ".cargo") @@ -317,7 +314,10 @@ class MachCommands(CommandBase): print("Removing `{}`{} package from {}".format(*print_msg)) for crate_path in crate_paths: if os.path.exists(crate_path): - delete(crate_path) + try: + delete(crate_path) + except: + print("Delete %s failed!" % crate_path) else: print("Would remove `{}`{} package from {}".format(*print_msg)) |