Improve error messages and remove check
* Improve error messages
* remove a check for the existance of unmount target. We probably
should not mask that the target was missing.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
@@ -132,14 +132,6 @@ func (m *Mount) GetParentPaths() ([]string, error) {
|
||||
|
||||
// Unmount the mount at the provided path
|
||||
func Unmount(mount string, flags int) error {
|
||||
if _, err := os.Stat(mount); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return fmt.Errorf("failed to access mount point %s: %w", mount, err)
|
||||
}
|
||||
|
||||
mount = filepath.Clean(mount)
|
||||
adsFile := mount + ":" + sourceStreamName
|
||||
var layerPath string
|
||||
|
||||
Reference in New Issue
Block a user