Skip to content

Commit ed1e812

Browse files
authored
Merge pull request #783 from pynappo/fix-passwd-doc
docs: add `os_get_passwd` fail and windows-specific values
2 parents 8af11b7 + 1d6b07a commit ed1e812

File tree

3 files changed

+34
-23
lines changed

3 files changed

+34
-23
lines changed

docs/docs.lua

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4639,19 +4639,20 @@ local doc = {
46394639
},
46404640
{
46414641
name = 'os_get_passwd',
4642-
desc = 'Returns password file information.',
4643-
returns = {
4644-
{
4645-
table({
4646-
{ 'username', 'string' },
4647-
{ 'uid', 'integer' },
4648-
{ 'gid', 'integer' },
4649-
{ 'shell', 'string' },
4650-
{ 'homedir', 'string' },
4651-
}),
4652-
'passwd',
4653-
},
4654-
},
4642+
desc = [[
4643+
Gets a subset of the password file entry for the current effective uid (not the
4644+
real uid). On Windows, `uid`, `gid`, and `shell` are set to `nil`.
4645+
]],
4646+
returns = ret_or_fail(
4647+
table({
4648+
{ 'username', 'string' },
4649+
{ 'uid', 'integer?', nil, "(nil on Windows)" },
4650+
{ 'gid', 'integer?', nil, "(nil on Windows)" },
4651+
{ 'shell', 'string?', nil, "(nil on Windows)"},
4652+
{ 'homedir', 'string' },
4653+
}),
4654+
'passwd'
4655+
)
46554656
},
46564657
{
46574658
name = 'os_getpid',

docs/docs.md

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/meta.lua

Lines changed: 14 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)