poetry icon indicating copy to clipboard operation
poetry copied to clipboard

fix: RunCommand calling scripts with incorrect executable path

Open chdsbd opened this issue 6 years ago • 7 comments

Fixes GH-965

Calling sys.argv should run the same program as the currently running program. To make calling Poetry scripts through RunCommand match this behavior, we must set sys.argv[0] to be the full path of the executable.

This change makes the behavior of calling a script through poetry run the same as calling a script directly from the .venv/bin.

Pull Request Check List

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!

  • [x] Added tests for changed code.
  • [x] Updated documentation for changed code.

Note: If your Pull Request introduces a new feature or changes the current behavior, it should be based on the develop branch. If it's a bug fix or only a documentation update, it should be based on the master branch.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

chdsbd avatar Mar 31 '19 21:03 chdsbd

My test is hacky. Any tips on cleaning it up would be appreciated.

chdsbd avatar Mar 31 '19 23:03 chdsbd

@sdispater This is ready for review

chdsbd avatar Mar 31 '19 23:03 chdsbd

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 13 '19 11:11 stale[bot]

This is still something I'd like to fix in poetry. I'll fix the conflicts when I get a commitment that this will be merged.

chdsbd avatar Nov 13 '19 13:11 chdsbd

Hello !

I just ran into this issue, is there still no plan to merge this ?

arbaes avatar May 12 '22 07:05 arbaes

@chdsbd are you still interested in bringing this to Poetry? if so, please merge the master branch to your code and resolve potential issues. This would allow for rereview.

Secrus avatar May 21 '22 14:05 Secrus

Any updates? This would be very nice if this issue was fixed..

qexat avatar Aug 24 '22 23:08 qexat

If desired, I can work on resolve the conflicts and address the issues.

@chdsbd are you okay if I rebase your work on another branch? (I will keep the authorship of your commits)

wagnerluis1982 avatar Oct 04 '22 21:10 wagnerluis1982

@wagnerluis1982 Thank you. That would be great!

chdsbd avatar Oct 05 '22 01:10 chdsbd

@finswimmer could you close this PR in favor of #6737?

wagnerluis1982 avatar Jan 15 '23 18:01 wagnerluis1982

Superseded by #6737

radoering avatar Jan 16 '23 05:01 radoering

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Feb 29 '24 01:02 github-actions[bot]