Skip to content

Commit

Permalink
docs(chmod): briefly mention Windows file perms
Browse files Browse the repository at this point in the history
File permissions on Windows are weird. This adds a brief note into the
README that this is something to watch out for. As far as I'm aware, WSL
completely avoids the weirdness because it's actually Linux (and so it
follows POSIX).
  • Loading branch information
nfischer committed Jan 15, 2022
1 parent f45d256 commit 1a8e38d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ Notable exceptions:
+ In symbolic modes, `a-r` and `-r` are identical. No consideration is
given to the `umask`.
+ There is no "quiet" option, since default behavior is to run silent.
+ Windows OS uses a very different permission model than POSIX. `chmod()`
does its best on Windows, but there are limits to how file permissions can
be set. Note that WSL (Windows subsystem for Linux) **does** follow POSIX,
so cross-platform compatibility should not be a concern there.

Returns a [ShellString](#shellstringstr) indicating success or failure.

Expand Down
4 changes: 4 additions & 0 deletions src/chmod.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ common.register('chmod', _chmod, {
//@ + In symbolic modes, `a-r` and `-r` are identical. No consideration is
//@ given to the `umask`.
//@ + There is no "quiet" option, since default behavior is to run silent.
//@ + Windows OS uses a very different permission model than POSIX. `chmod()`
//@ does its best on Windows, but there are limits to how file permissions can
//@ be set. Note that WSL (Windows subsystem for Linux) **does** follow POSIX,
//@ so cross-platform compatibility should not be a concern there.
//@
//@ Returns a [ShellString](#shellstringstr) indicating success or failure.
function _chmod(options, mode, filePattern) {
Expand Down

0 comments on commit 1a8e38d

Please sign in to comment.