Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Issue 2727553005: [step_runner] add logic to resolve absolute path of argv[0] on windows. (Closed)

Created:
3 years, 9 months ago by iannucci
Modified:
3 years, 9 months ago
Reviewers:
dnj, Vadim Sh.
CC:
chromium-reviews, infra-reviews+recipes-py_chromium.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

[step_runner] add logic to resolve absolute path of argv[0] on windows. CreateProcess will automagically append '.exe' if the application supplied doesn't have one, which explains why "cipd" works on bots (cipd.exe is in PATH), but not for devs (cipd.bat is in PATH, but no cipd.exe). This CL will hunt through PATHEXT for each folder on PATH, which is what cmd.exe does when you type e.g. 'cipd'. If the supplied command already has an extension or is an absolute path, behavior will not change. This hunt is done before printing the step to stdout, so we should be able to see when this logic had an effect. R=vadimsh@chromium.org,dnj@chromium.org BUG=697327 Review-Url: https://codereview.chromium.org/2727553005 Committed: https://github.com/luci/recipes-py/commit/ea723457b7a1d098594e68ad82f98964dc3d6cfa

Patch Set 1 #

Total comments: 3

Patch Set 2 : .lower() to generate non-silly extensions #

Patch Set 3 : some fixes #

Patch Set 4 : isfile #

Patch Set 5 : the most important change :D #

Patch Set 6 : use only .exe and .bat #

Patch Set 7 : 'fixes' #

Patch Set 8 : fix comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -7 lines) Patch
M recipe_engine/step_runner.py View 1 2 3 4 5 6 7 4 chunks +54 lines, -7 lines 0 comments Download

Messages

Total messages: 17 (8 generated)
iannucci
3 years, 9 months ago (2017-03-01 19:30:53 UTC) #1
Vadim Sh.
please try it for real before committing https://codereview.chromium.org/2727553005/diff/1/recipe_engine/step_runner.py File recipe_engine/step_runner.py (right): https://codereview.chromium.org/2727553005/diff/1/recipe_engine/step_runner.py#newcode651 recipe_engine/step_runner.py:651: if sys.platform ...
3 years, 9 months ago (2017-03-01 19:40:45 UTC) #2
iannucci
On 2017/03/01 19:40:45, Vadim Sh. wrote: > please try it for real before committing obviously!! ...
3 years, 9 months ago (2017-03-01 19:53:41 UTC) #3
Vadim Sh.
lgtm
3 years, 9 months ago (2017-03-01 20:01:48 UTC) #4
iannucci
On 2017/03/01 20:01:48, Vadim Sh. wrote: > lgtm Actually, what do you think if this ...
3 years, 9 months ago (2017-03-01 20:44:09 UTC) #5
Vadim Sh.
On 2017/03/01 20:44:09, iannucci wrote: > On 2017/03/01 20:01:48, Vadim Sh. wrote: > > lgtm ...
3 years, 9 months ago (2017-03-01 20:45:00 UTC) #6
iannucci
On 2017/03/01 20:45:00, Vadim Sh. wrote: > On 2017/03/01 20:44:09, iannucci wrote: > > On ...
3 years, 9 months ago (2017-03-01 20:46:37 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2727553005/140001
3 years, 9 months ago (2017-03-01 22:53:02 UTC) #14
commit-bot: I haz the power
3 years, 9 months ago (2017-03-01 22:56:41 UTC) #17
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://github.com/luci/recipes-py/commit/ea723457b7a1d098594e68ad82f98964dc3...

Powered by Google App Engine
This is Rietveld 408576698