Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: fix error from test #172

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

kolyshkin
Copy link
Collaborator

When running make test, there appears an error:

/bin/sh: 1: test: go test -exec sudo: unexpected operator

or

/bin/sh: line 1: test: go test -exec sudo: binary operator expected

(depending on which shell is used).

This is caused by CMD value containing extra quotes (from RUN_VIA_SUDO=-exec "sudo -n") which test sees as an extra option.

Enclose test argument in single quotes to fix the issue.

When running make test, there appears an error:

	/bin/sh: 1: test: go test -exec sudo: unexpected operator

or

	/bin/sh: line 1: test: go test -exec sudo: binary operator expected

(depending on which shell is used).

This is caused by CMD value containing extra quotes (from
RUN_VIA_SUDO=-exec "sudo -n") which test sees as an extra option.

Enclose test argument in single quotes to fix the issue.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Collaborator Author

@tianon I think you'll like this one :)

@kolyshkin
Copy link
Collaborator Author

@thaJeztah PTAL

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DOH! That's a fun one indeed.

Hoping ... one day, go test to have a --recursive option to run all modules in the path recursively. This is such a pain all.

LGTM

@thaJeztah thaJeztah merged commit 113d2d6 into moby:main Oct 23, 2024
19 checks passed
@tianon
Copy link
Member

tianon commented Oct 24, 2024

@tianon I think you'll like this one :)

You're 100% correct, I do like this one! 😁 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants