Visitar URL original
fix: do not treat -m substring in %run paths as module option 馃馃 by r3wretrhy 路 Pull Request #15400 路 ipython/ipython 路 GitHub
Skip to content

fix: do not treat -m substring in %run paths as module option 馃馃 - #15400

Open
r3wretrhy wants to merge 1 commit into
ipython:mainfrom
r3wretrhy:fix-run-dash-m-path
Open

r3wretrhy wants to merge 1 commit into
ipython:mainfrom
r3wretrhy:fix-run-dash-m-path

Conversation

@r3wretrhy

Copy link
Copy Markdown

fix: do not treat -m substring in %run paths as module option 馃馃

%run inserted -- after -m whenever the option string contained the substring -m. A script path like test-main.py matched that check, shlex.join rewrote the line, and the file did not run.

Only rewrite when -m is an exact argv token.

Fixes #14849

This branch has not been deployed

No deployments
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.

Some error in %run ,when I use %run "{path}" if path has start with "-m"

1 participant