mirror of https://github.com/docker/compose.git
No specific case for windows, always resolve binary name before executing command
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
parent
41a1553dab
commit
66a1263342
|
@ -26,6 +26,7 @@ import (
|
|||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/docker/compose-cli/cli/mobycli/resolvepath"
|
||||
apicontext "github.com/docker/compose-cli/context"
|
||||
"github.com/docker/compose-cli/context/store"
|
||||
"github.com/docker/compose-cli/metrics"
|
||||
|
@ -60,7 +61,7 @@ func mustDelegateToMoby(ctxType string) bool {
|
|||
|
||||
// Exec delegates to com.docker.cli if on moby context
|
||||
func Exec(root *cobra.Command) {
|
||||
execBinary, err := LookPath(ComDockerCli)
|
||||
execBinary, err := resolvepath.LookPath(ComDockerCli)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
package mobycli
|
||||
package resolvepath
|
||||
|
||||
import (
|
||||
"os/exec"
|
|
@ -28,7 +28,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package mobycli
|
||||
package resolvepath
|
||||
|
||||
import (
|
||||
"errors"
|
|
@ -24,4 +24,4 @@ fi
|
|||
|
||||
BASEPATH="${1-}"
|
||||
|
||||
ltag -t "${BASEPATH}scripts/validate/template" -excludes "validate testdata cli/mobycli/lp_windows.go" --check -v
|
||||
ltag -t "${BASEPATH}scripts/validate/template" -excludes "validate testdata resolvepath" --check -v
|
Loading…
Reference in New Issue