diff options
author | SwiftyOS <craigswift13@gmail.com> | 2023-09-15 20:09:18 +0200 |
---|---|---|
committer | SwiftyOS <craigswift13@gmail.com> | 2023-09-15 20:09:18 +0200 |
commit | 71cb72b3a4e0881a8f163028b650abe7306fe4dd (patch) | |
tree | f544e0c0ada7dc6c2adadd256bcbbaabbcf6f178 /cli.py | |
parent | Added checks and templates to cli (diff) | |
download | Auto-GPT-71cb72b3a4e0881a8f163028b650abe7306fe4dd.tar.gz Auto-GPT-71cb72b3a4e0881a8f163028b650abe7306fe4dd.tar.bz2 Auto-GPT-71cb72b3a4e0881a8f163028b650abe7306fe4dd.zip |
changed to check if there are staged changes
Diffstat (limited to 'cli.py')
-rw-r--r-- | cli.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -399,12 +399,13 @@ def enter(agent_name, branch): click.echo(click.style(f"⚠️ The agent '{agent_name}' has already entered the arena. Use './run arena submit' to update your submission.", fg='yellow')) return - # Check if there are uncommitted changes + # Check if there are staged or unstaged changes changes = subprocess.check_output(['git', 'status', '--porcelain']).decode('utf-8').strip() if changes: - click.echo(click.style(f"❌ There are uncommitted changes. Please commit or stash them and run the command again.", fg='red')) + click.echo(click.style(f"❌ There are staged or unstaged changes. Please commit or unstage them and run the command again.", fg='red')) return + try: # Load GitHub access token from file with open('.github_access_token', 'r') as file: @@ -499,11 +500,12 @@ def submit(agent_name, branch): click.echo(click.style(f"❌ The agent '{agent_name}' has not yet entered the arena. Please enter the arena with './run arena enter'", fg='red')) return - # Check if there are uncommitted changes + # Check if there are staged or unstaged changes changes = subprocess.check_output(['git', 'status', '--porcelain']).decode('utf-8').strip() if changes: - click.echo(click.style(f"❌ There are uncommitted changes. Please commit or stash them and run the command again.", fg='red')) + click.echo(click.style(f"❌ There are staged or unstaged changes. Please commit or unstage them and run the command again.", fg='red')) return + try: # Load GitHub access token from file |