Skip to content

Need better error message for dirs with dot in it #212

@tony

Description

@tony

If no config is in a directory

❯ tmuxp load ~/work/dir

Traceback (most recent call last):
  File "/Users/me/Library/Python/2.7/bin/tmuxp", line 11, in <module>
    sys.exit(cli.cli())
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/tmuxp/cli.py", line 511, in command_load
    load_workspace(config[-1], **tmux_options)
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/tmuxp/cli.py", line 219, in load_workspace
    sconfig = sconfig.import_config(config_file).get()
  File "/Users/me/Library/Python/2.7/lib/python/site-packages/kaptan/__init__.py", line 68, in import_config
    self.configuration_data = self.handler.load(value)
AttributeError: 'NoneType' object has no attribute 'load'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions