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

Do not turn echo off for subsequent commands in batch activators (#2411) #2412

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

pawelszramowski
Copy link
Contributor

@pawelszramowski pawelszramowski commented Sep 6, 2022

Some @ are certainly unnecessary but I don't feel confident enough to optimize.

Closes #2411

Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

Who this does waaaay to much change, that I'm not comfortable with. We should only make it as much as possible. Also did you see how does the venv module handles this and why is not an issue there?

@pawelszramowski
Copy link
Contributor Author

Did you notice that except for removing the first @echo off lines all the other changes are just adding a single @ before each command? echo off turns echo off for the current cmd.exe instance, @ turns it off for one line. @echo off is convenient and clean but there's no reasonable way to restore the caller's setting when you're done (yeah, batch is crap):

venv has got the same issue.

@pfmoore
Copy link
Member

pfmoore commented Sep 7, 2022

I can confirm, while this is pretty messy it is indeed the best way of doing this.

@gaborbernat
Copy link
Contributor

Can you please fill in a similar PR for venv? thanks!

@gaborbernat gaborbernat merged commit dbedec5 into pypa:main Sep 8, 2022
@pawelszramowski pawelszramowski deleted the no_echo_off branch September 8, 2022 20:32
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.

Batch activators unexpectedly turn echo off for subsequent commands
3 participants