Skip to content

The sheldon init Command Fails When a Config Directory Does Not Yet Exist #197

Description

@jbenner-radham

Hi,

First off, thanks for developing some awesome open source software!

On both Linux and macOS I'm getting the following error when I try to execute sheldon init --shell zsh:

sheldon init --shell zsh

error: failed to acquire shared lock on config directory
  due to: failed to open `/Users/jamesbenner/.config/sheldon`
  due to: No such file or directory (os error 2)

The /Users/jamesbenner/.config directory exists, just not the sheldon one. If I manually create the sheldon subdirectory and re-run sheldon init --shell zsh it works fine:

> mkdir ~/.config/sheldon
> sheldon init --shell zsh
Initialize new config file `~/.config/sheldon/plugins.toml`? [y/N] y
Initialized ~/.config/sheldon/plugins.toml

I'm not sure if it matters, but I do have the $XDG_CONFIG_HOME environment variable set:

> echo $XDG_CONFIG_HOME
/Users/jamesbenner/.config

FYI, I think it's happening here in the code. If you'd like I could try and take a crack at fixing this, but full disclosure I'm no Rust expert.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions