Windows: chrootarchive refactor
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
24fd826fc0
commit
d025345cdd
5 changed files with 77 additions and 34 deletions
14
chrootarchive/archive_unix.go
Normal file
14
chrootarchive/archive_unix.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
// +build !windows
|
||||
|
||||
package chrootarchive
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func chroot(path string) error {
|
||||
if err := syscall.Chroot(path); err != nil {
|
||||
return err
|
||||
}
|
||||
return syscall.Chdir("/")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue