Files
NapCatQQ/.pnpm-store/v3/files/ab/3a3e4ebbccb33b3fa0d419cef7f1b0f5f815fb8e06f1c0868cbd632229dae8a7062f28255169fcd004a6cc1dd6ef8b114a53aacd956fdcfb1b42be7a94ecc7
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
463 B
Plaintext

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