mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Fix too many arguments
This commit is contained in:
@@ -636,7 +636,7 @@ func (d *Driver) containerBinds(task *drivers.TaskConfig, driverConfig *TaskConf
|
||||
// Otherwise, we assume we receive a relative path binding in the format
|
||||
// relative/to/task:/also/in/container
|
||||
if taskLocalBindVolume {
|
||||
src = expandPath(task.TaskDir().Dir, src, runtime.GOOS)
|
||||
src = expandPath(task.TaskDir().Dir, src)
|
||||
} else {
|
||||
// Resolve dotted path segments
|
||||
src = filepath.Clean(src)
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/cli/cli/config/configfile"
|
||||
@@ -207,7 +208,7 @@ func validateCgroupPermission(s string) bool {
|
||||
// expandPath returns the absolute path of dir, relative to base if dir is relative path.
|
||||
// base is expected to be an absolute path
|
||||
func expandPath(base, dir string) string {
|
||||
if os == "windows" {
|
||||
if runtime.GOOS == "windows" {
|
||||
pipeExp := regexp.MustCompile(`^` + rxPipe + `$`)
|
||||
match := pipeExp.FindStringSubmatch(strings.ToLower(dir))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user