Skip to content

Create .local/bin if it doesn't exist ("Could not find a PATH directory automatically" error) #268

Description

@dot-file

I've added /home/user/.local/bin to my PATH variable but was still getting this error:
Could not find a PATH directory automatically, falling back to manual selection

After reading the source code I found out it checks if a directory exists and is writeable in one go (config_unix.go:28):

err := checkDirExistsAndWritable(p)
if err != nil {
	log.Debugf("Error [%s] checking path", err)
	continue
}

This leads to the aforementioned error even if the PATH var is set correctly and it's just that the directory doesn't exist. As it's in user home directory I see no problem in creating it automatically. But if this is not the case, the error message should be changed because currently it's misleading.

I can make the PR myself (though I'm not really familiar with golang) but I just wanted to know if it's worth doing in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions