Have more intelligence on splitting bind paths

This commit is contained in:
Gregory Kurtzer
2021-09-01 21:13:46 -07:00
parent 50e6f0daf4
commit caf9f4b80f
2 changed files with 44 additions and 2 deletions

View File

@@ -7,10 +7,10 @@ import (
"fmt"
"os"
"path"
"strings"
"syscall"
"github.com/hpcng/warewulf/internal/pkg/container"
"github.com/hpcng/warewulf/internal/pkg/util"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
"github.com/spf13/cobra"
)
@@ -38,9 +38,11 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
var source string
var dest string
bind := strings.Split(b, ":")
bind := util.SplitPaths(b, ":")
source = bind[0]
fmt.Println(bind)
if len(bind) == 1 {
dest = source
} else {