mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19:04 +00:00
Log info message when unable to chown file #1521
This commit is contained in:
parent
ec40a1a08a
commit
473be23153
@ -12,7 +12,14 @@ func changeOwner(info fs.FileInfo, file *os.File) error {
|
|||||||
if stat, ok := info.Sys().(*syscall.Stat_t); ok {
|
if stat, ok := info.Sys().(*syscall.Stat_t); ok {
|
||||||
uid := int(stat.Uid)
|
uid := int(stat.Uid)
|
||||||
gid := int(stat.Gid)
|
gid := int(stat.Gid)
|
||||||
return os.Chown(file.Name(), uid, gid)
|
|
||||||
|
err := os.Chown(file.Name(), uid, gid)
|
||||||
|
if err != nil {
|
||||||
|
// this happens with snap confinement
|
||||||
|
// not really a big issue as users can chown
|
||||||
|
// the file themselves if required.
|
||||||
|
log.Info("Skipping chown: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
4.30.8:
|
||||||
|
- Log info message when unable to chown file in linux (e.g. snap confinement) #1521
|
||||||
|
|
||||||
|
|
||||||
4.30.7:
|
4.30.7:
|
||||||
- Fixed bug in splice operator #1511
|
- Fixed bug in splice operator #1511
|
||||||
- Fixed value operator bug #1515
|
- Fixed value operator bug #1515
|
||||||
|
Loading…
Reference in New Issue
Block a user