mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-05 09:14:28 +00:00
a41e372b39
Former-commit-id: fa0dc873367b92a06b10fd989e3fec960c03065a [formerly e98efffa565ea6aa3eadeb19c2f9a66a56eb5ddd] Former-commit-id: ce6e4f01d12015e67a51aa7d928a6ab8e8eedeee
22 lines
359 B
Go
22 lines
359 B
Go
package fuse
|
|
|
|
import (
|
|
"bytes"
|
|
"errors"
|
|
"os/exec"
|
|
)
|
|
|
|
func unmount(dir string) error {
|
|
cmd := exec.Command("fusermount", "-u", dir)
|
|
output, err := cmd.CombinedOutput()
|
|
if err != nil {
|
|
if len(output) > 0 {
|
|
output = bytes.TrimRight(output, "\n")
|
|
msg := err.Error() + ": " + string(output)
|
|
err = errors.New(msg)
|
|
}
|
|
return err
|
|
}
|
|
return nil
|
|
}
|