Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dts update crashes if a version of the commands has been removed #65

Open
liampaull opened this issue Jun 16, 2020 · 1 comment
Open
Labels
good first issue Good for newcomers

Comments

@liampaull
Copy link
Member

If a version is removed (in this case daffy-new-init) and you run dts update you get this error and it fails:

dts :  Traceback (most recent call last):
    :    File "/home/liam/.local/lib/python3.6/site-packages/dt_shell/main.py", line 38, in cli_main
    :      cli_main_()
    :    File "/home/liam/.local/lib/python3.6/site-packages/dt_shell/main.py", line 175, in cli_main_
    :      shell.onecmd(cmdline)
    :    File "/usr/lib/python3.6/cmd.py", line 217, in onecmd
    :      return func(arg)
    :    File "/home/liam/.local/lib/python3.6/site-packages/dt_shell/cli.py", line 287, in <lambda>
    :      do_command_lam = lambda s, w: do_command(klass, s, w)
    :    File "/home/liam/.local/lib/python3.6/site-packages/dt_shell/dt_command_abs.py", line 59, in do_command
    :      cls.command(shell, args)
    :    File "/home/liam/.dt-shell/commands-multi/daffy-new-init/update/command.py", line 19, in command
    :      if shell.update_commands():
    :    File "/home/liam/.local/lib/python3.6/site-packages/dt_shell/cli.py", line 328, in update_commands
    :      return update_commands(self.commands_path, self.repo_info)
    :    File "/home/liam/.local/lib/python3.6/site-packages/dt_shell/commands_.py", line 133, in update_commands
    :      repo_info.branch
    :    File "/home/liam/.local/lib/python3.6/site-packages/dt_shell/utils.py", line 121, in run_cmd
    :      raise RuntimeError(msg)
    :  RuntimeError: The command ['git', '-C', '/home/liam/.dt-shell/commands-multi/daffy-new-init', 'pull', '--recurse-submodules', 'origin', 'daffy-new-init'] failed with exit code 1.
    :  Error:
    :  None
@liampaull
Copy link
Member Author

note that this only happens if you are still in the version that you are trying to update. So an easy fix is to switch to a valid version and update. So it just could be a little more graceful.

@liampaull liampaull added the good first issue Good for newcomers label Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant