summaryrefslogtreecommitdiff
path: root/internal/app/siftool/mount.go
blob: 5da071b93eb9c0de1d6b65d377e0a5f6db3cbe43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (c) 2022, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.

package siftool

import (
	"context"

	"github.com/sylabs/sif/v2/pkg/user"
)

// Mount mounts the primary system partition of the SIF file at path into mountPath.
func (a *App) Mount(ctx context.Context, path, mountPath string) error {
	return user.Mount(ctx, path, mountPath,
		user.OptMountStdout(a.opts.out),
		user.OptMountStderr(a.opts.err),
	)
}