Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit da09c9c

Browse files
committed
Move lp_files to separate package to allow excluding headers validation
Signed-off-by: Guillaume Tardif <[email protected]>
1 parent 41a1553 commit da09c9c

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

cli/mobycli/exec.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
apicontext "github.com/docker/compose-cli/context"
3030
"github.com/docker/compose-cli/context/store"
3131
"github.com/docker/compose-cli/metrics"
32+
"github.com/docker/compose-cli/cli/mobycli/resolvepath"
3233
)
3334

3435
var delegatedContextTypes = []string{store.DefaultContextType}
@@ -60,7 +61,7 @@ func mustDelegateToMoby(ctxType string) bool {
6061

6162
// Exec delegates to com.docker.cli if on moby context
6263
func Exec(root *cobra.Command) {
63-
execBinary, err := LookPath(ComDockerCli)
64+
execBinary, err := resolvepath.LookPath(ComDockerCli)
6465
if err != nil {
6566
fmt.Fprintln(os.Stderr, err)
6667
os.Exit(1)

cli/mobycli/lp_unix.go renamed to cli/mobycli/resolvepath/lp_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
limitations under the License.
1717
*/
1818

19-
package mobycli
19+
package resolvepath
2020

2121
import (
2222
"os/exec"

cli/mobycli/lp_windows.go renamed to cli/mobycli/resolvepath/lp_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2828
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31-
package mobycli
31+
package resolvepath
3232

3333
import (
3434
"errors"

scripts/validate/fileheader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ fi
2424

2525
BASEPATH="${1-}"
2626

27-
ltag -t "${BASEPATH}scripts/validate/template" -excludes "validate testdata cli/mobycli/lp_windows.go" --check -v
27+
ltag -t "${BASEPATH}scripts/validate/template" -excludes "validate testdata resolvepath" --check -v

0 commit comments

Comments
 (0)