Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test() does not support -w and -x options #768

@dundalek

Description

@dundalek

These are sometimes useful and are not supported as of latest shelljs (v0.7.8):

  • -w file exists and write permission is granted
  • -x file exists and execute permission is granted

Usage:

require('shelljs').test('-x', '/bin/bash')
// => test: option not recognized: x

It can be implemented using fs.accessSync. Would you be interested in a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions