Update gitignore (sorry)
This commit is contained in:
parent
a8f8c4d7ad
commit
cca8b02fea
6604 changed files with 1219661 additions and 4 deletions
21
electron/node_modules/@npmcli/fs/lib/with-owner-sync.js
generated
vendored
Normal file
21
electron/node_modules/@npmcli/fs/lib/with-owner-sync.js
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
const getOptions = require('./common/get-options.js')
|
||||
const owner = require('./common/owner-sync.js')
|
||||
|
||||
const withOwnerSync = (path, fn, opts) => {
|
||||
const options = getOptions(opts, {
|
||||
copy: ['owner'],
|
||||
})
|
||||
|
||||
const { uid, gid } = owner.validate(path, options.owner)
|
||||
|
||||
const result = fn({ uid, gid })
|
||||
|
||||
owner.update(path, uid, gid)
|
||||
if (typeof result === 'string') {
|
||||
owner.update(result, uid, gid)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
module.exports = withOwnerSync
|
||||
Loading…
Add table
Add a link
Reference in a new issue