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

Make addAuthFromNetrc ignore ENOTDIR errors #433

Merged
merged 1 commit into from
Dec 4, 2023

Commits on Apr 22, 2023

  1. Make addAuthFromNetrc ignore ENOTDIR errors

    The function already returns early if the specified 'netrc' configuration points to a non existing file, but currently returns an error if the OS reports ENOTDIR:
    
    This will happen if the $HOME directory of the specified user points to a file instead a directory - something eg. 'void linux' does for user 'nobody':
    
    ```
    $ grep nobody /etc/passwd
    nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
    ```
    
    go-getter then attempts to open `/dev/null/.netrc` which fails with ENOTDIR - something that should just be threated the same way as a non existing file (in this case)
    adrian-bl committed Apr 22, 2023
    Configuration menu
    Copy the full SHA
    5ccb39a View commit details
    Browse the repository at this point in the history