Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

which() should check executability before returning a value #657

Closed
Labels
fixBug/defect, or a fix for such a problemhelp wanted
@nfischer

Description

@nfischer

which() should only return a value if it finds a matching file in the PATHand that file is executable.

I'm not sure if it's possible to reliably check executability on Windows, but this should at least be done for unix.This section of the docs suggests a way of usingfs.statSync() to check this info.

The right way would be to also check if the current user matches theuser,group, orall fields as well, but I think this might be tricky. It should be sufficient to just assume that we do have a match, and just do an OR of all three (ex.userCanExecute() || groupCanExecute() || allCanExecute()).

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixBug/defect, or a fix for such a problemhelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp