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

Watson does not update the configuration #492

Open
Issam2204 opened this issue Jan 7, 2023 · 0 comments
Open

Watson does not update the configuration #492

Issam2204 opened this issue Jan 7, 2023 · 0 comments

Comments

@Issam2204
Copy link

Issam2204 commented Jan 7, 2023

I used the following command to update the options of watson:

watson config -e

After saving, I get the following error as I exit the editor:

Traceback (most recent call last):
  File "/home/issam/.local/bin/watson", line 5, in <module>
    from watson.__main__ import cli
  File "/home/issam/.local/lib/python3.10/site-packages/watson/__main__.py", line 3, in <module>
    cli.cli()
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/issam/.local/lib/python3.10/site-packages/watson/cli.py", line 136, in wrapper
    return func(*args, **kwargs)
  File "/home/issam/.local/lib/python3.10/site-packages/watson/cli.py", line 1465, in config
    safe_save(watson.config_file, newconfig)
  File "/home/issam/.local/lib/python3.10/site-packages/watson/utils.py", line 252, in safe_save
    shutil.move(path, path + ext)
  File "/usr/lib/python3.10/shutil.py", line 813, in move
    raise Error("Destination path '%s' already exists" % real_dst)
shutil.Error: Destination path '/home/issam/.config/watson/config.bak/config' already exists

I think watson should force the overwrite.

This is not blocking as I can edit the config file myself with nano/vim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant