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

os/exec: on Windows look for extensions in Run if not already done #67035

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

qiulaidongfeng
Copy link
Member

@qiulaidongfeng qiulaidongfeng commented Apr 25, 2024

CL 512155 fixed #36768, but introduced #62596.
CL 527820 fixed #62596, but meant that the code failed to look up
file extensions on Windows for a relative path.
This CL fixes that problem by recording whether it has already
looked up file extensions.
This does mean that if Path is set manually then we do not update
it with file extensions, as doing that would be racy.

Add test in CL 589016.

For #66586

@gopherbot
Copy link

This PR (HEAD: 78e0ae5) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

This PR (HEAD: fd6c529) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@qiulaidongfeng qiulaidongfeng changed the title os/exec: not add a suffix to Cmd.Path os/exec: not add a suffix to Cmd.Path when absolute path Apr 25, 2024
@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 2: Commit-Queue+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 2:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-25T12:47:06Z","revision":"513c94fb4669854608794164d65687b1d6b0a07e"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 2: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 2:

This CL has failed the run. Reason:

Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results):


FAILURE

Error: failed to run "make.bash": exit status 2

Links:


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 2: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 4: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 4:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-25T13:00:46Z","revision":"74f07c1f2dca4e87e05e2c846a5721c2efc0986b"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 4: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 4:

This CL has failed the run. Reason:

Tryjob golang/try/gotip-windows-amd64 has failed with summary (view all results):


FAILURE

Error: shard 1: failed to run "make.bat": exit status 1

Links:


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 4: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

This PR (HEAD: be41db8) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 5: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 5:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-25T13:27:31Z","revision":"809075a3c45077dda6dc4d9fecc402dbec7fecff"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 5: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 5:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 5: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 5:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

This PR (HEAD: d9ffb2d) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 6: Commit-Queue+1

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 6:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-04-26T08:22:57Z","revision":"d21a94e2cfa4adb969a93ad9900d863e5a40e629"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 6: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 6:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 6: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiulaidongfeng:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

This PR (HEAD: 44f0084) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from qiu laidongfeng2:

Patch Set 13: Commit-Queue+1

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 13:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-30T13:27:42Z","revision":"72d8af7b33fc64358bdc00996214d61e4331cf27"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

n
Change-Id: If135e6103cc0fac40a3724e2ba43a72f48c5fc9f
@gopherbot
Copy link

Message from qiu laidongfeng2:

Patch Set 13: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 13:

This CL has failed the run. Reason:

Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results):


Build or test failure, click here for results.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 13: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

This PR (HEAD: f9ace65) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

n
Change-Id: Ib1a532c540c890ce988e4092699fd879baf9799f
@gopherbot
Copy link

This PR (HEAD: 7ee45f8) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from qiu laidongfeng2:

Patch Set 15: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 15:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-30T13:49:01Z","revision":"f58043551fa4c9fb1220ac85d5c68c5d0d5e0735"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiu laidongfeng2:

Patch Set 15: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 15:

This CL has failed the run. Reason:

Tryjob golang/try/gotip-linux-amd64-longtest has failed with summary (view all results):


Build or test failure, click here for results.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 15: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiu laidongfeng2:

Patch Set 16: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 16:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-30T14:29:39Z","revision":"67965b635bceeefebf8927c66f9c9666f96f82dc"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiu laidongfeng2:

Patch Set 16: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 16:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 16: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 16:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiu laidongfeng2:

Patch Set 16:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Ian Lance Taylor:

Patch Set 16:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

n
Change-Id: I04351ac442c5d5cd25ddca84ad9e76a88bb21abb
@gopherbot
Copy link

This PR (HEAD: 197d6e4) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/581695.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link

Message from qiu laidongfeng2:

Patch Set 17: Commit-Queue+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 17:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-31T08:14:13Z","revision":"99c08b19a2025c6c4faa5ae0a7a312cca43ddb3d"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from qiu laidongfeng2:

Patch Set 17: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 17:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go LUCI:

Patch Set 17: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/581695.
After addressing review feedback, remember to publish your drafts!

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.

os/exec: Cmd.String races with Cmd.Start on Windows cmd/go: cache results of exec.LookPath
2 participants