mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
check return value of syscall.Chdir when changing working directory
This commit is contained in:
parent
620bc5b9e1
commit
1043055b10
2 changed files with 4 additions and 1 deletions
1
AUTHORS
1
AUTHORS
|
@ -185,4 +185,5 @@ Vladimir Kirillov <proger@wilab.org.ua>
|
|||
Walter Stanish <walter@pratyeka.org>
|
||||
Wes Morgan <cap10morgan@gmail.com>
|
||||
Will Dietz <w@wdtz.org>
|
||||
Yang Bai <hamo.by@gmail.com>
|
||||
Zaiste! <oh@zaiste.net>
|
||||
|
|
|
@ -27,7 +27,9 @@ func setupWorkingDirectory(workdir string) {
|
|||
if workdir == "" {
|
||||
return
|
||||
}
|
||||
syscall.Chdir(workdir)
|
||||
if err := syscall.Chdir(workdir); err != nil {
|
||||
log.Fatalf("Unable to change dir to %v: %v", workdir, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Takes care of dropping privileges to the desired user
|
||||
|
|
Loading…
Reference in a new issue