mirror of
https://github.com/servo/servo
synced 2026-05-09 08:32:31 +02:00
mach: Report an error instead of running try with a dirty working directory (#34349)
Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
@@ -842,6 +842,11 @@ tests/wpt/mozilla/tests for Servo-only tests""" % reference_path)
|
||||
@CommandArgument('try_strings', default=["full"], nargs='...',
|
||||
help="A list of try strings specifying what kind of job to run.")
|
||||
def try_command(self, remote: str, try_strings: list[str]):
|
||||
if subprocess.check_output(["git", "diff", "--cached", "--name-only"]).strip():
|
||||
print("Cannot run `try` with staged and uncommited changes. ")
|
||||
print("Please either commit or stash them before running `try`.")
|
||||
return 1
|
||||
|
||||
remote_url = subprocess.check_output(["git", "config", "--get", f"remote.{remote}.url"]).decode().strip()
|
||||
if "github.com" not in remote_url:
|
||||
print(f"The remote provided ({remote_url}) isn't a GitHub remote.")
|
||||
|
||||
Reference in New Issue
Block a user