coreos / fleet

fleet ties together systemd and etcd into a distributed init system
Apache License 2.0
2.42k stars 303 forks source link

build: secured CDIR variable, now should work with spaces in path #1643

Closed kayrus closed 7 years ago

dongsupark commented 7 years ago

Generally I think it's a good idea. But functional test's build is always failing with:

can't load package: package github.com/coreos/fleet/functional: cannot find package "github.com/coreos/fleet/functional" in any of:
    /home/core/go/src/github.com/coreos/fleet/functional (from $GOROOT)
    /home/core/fleet/functional/gopath/src/github.com/coreos/fleet/functional (from $GOPATH)

Interesting.

dongsupark commented 7 years ago

Ok, the build error happens because both functional/test and build-env try to define a variable ${CDIR}, although functional/test sources build-env. You need to rename ${CDIR} into another name, either in functional/test or build-env. I think a correct fix would be to update build-env, as that's also imported by other files.

kayrus commented 7 years ago

fixed in other way. just use CDIR=$(cddirname "$0/.."&& pwd)

dongsupark commented 7 years ago

LGTM