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

Batch activators unexpectedly turn echo off for subsequent commands #2411

Closed
pawelszramowski opened this issue Sep 6, 2022 · 1 comment · Fixed by #2412
Closed

Batch activators unexpectedly turn echo off for subsequent commands #2411

pawelszramowski opened this issue Sep 6, 2022 · 1 comment · Fixed by #2412

Comments

@pawelszramowski
Copy link
Contributor

pawelszramowski commented Sep 6, 2022

Issue

Consider the following batch script:

python -m virtualenv --quiet venv
CALL venv\Scripts\activate.bat
REM spam
CALL deactivate.bat
REM eggs

The expected output is:

W:\>python -m virtualenv --quiet venv

W:\>CALL venv\Scripts\activate.bat

(venv) W:\>REM spam

(venv) W:\>CALL deactivate.bat

W:\>REM eggs

The actual output is:

W:\>python -m virtualenv --quiet venv

W:\>CALL venv\Scripts\activate.bat

This is caused by @echo off at the beginning of both scripts that need to be undone after calling them:

python -m virtualenv --quiet venv
CALL venv\Scripts\activate.bat
@ECHO ON
REM spam
CALL deactivate.bat
@ECHO ON
REM eggs

Environment

  • OS: Windows 10
  • pip list: not relevant

Output of the virtual environment creation

Also not really relevant. virtualenv version 20.16.4.

@gaborbernat
Copy link
Contributor

PR welcome. Also, try please the latest release, that's the only version really supported, and yes it might be relevant.

pawelszramowski pushed a commit to pawelszramowski/virtualenv that referenced this issue Sep 6, 2022
pawelszramowski pushed a commit to pawelszramowski/virtualenv that referenced this issue Sep 6, 2022
gaborbernat pushed a commit that referenced this issue Sep 8, 2022
github-actions bot added a commit to MaRDI4NFDI/open-interfaces that referenced this issue Sep 23, 2022
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.15.1 to
20.16.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pypa/virtualenv/releases">virtualenv's
releases</a>.</em></p>
<blockquote>
<h2>20.16.5</h2>
<h2>What's Changed</h2>
<ul>
<li>release 20.16.4 by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2407">pypa/virtualenv#2407</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2410">pypa/virtualenv#2410</a></li>
<li>Do not turn echo off for subsequent commands in batch activators (<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2411">#2411</a>)
by <a
href="https://github.com/pawelszramowski"><code>@​pawelszramowski</code></a>
in <a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2412">pypa/virtualenv#2412</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/pawelszramowski"><code>@​pawelszramowski</code></a>
made their first contribution in <a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2412">pypa/virtualenv#2412</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pypa/virtualenv/compare/20.16.4...20.16.5">https://github.com/pypa/virtualenv/compare/20.16.4...20.16.5</a></p>
<h2>20.16.4</h2>
<h2>What's Changed</h2>
<ul>
<li>release 20.16.3 by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2396">pypa/virtualenv#2396</a></li>
<li>Remove universal wheel, python 2 is unsupported by <a
href="https://github.com/gopackgo90"><code>@​gopackgo90</code></a> in <a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2402">pypa/virtualenv#2402</a></li>
<li>Bump setuptools by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2405">pypa/virtualenv#2405</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/gopackgo90"><code>@​gopackgo90</code></a> made
their first contribution in <a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2402">pypa/virtualenv#2402</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pypa/virtualenv/compare/20.16.3...20.16.4">https://github.com/pypa/virtualenv/compare/20.16.3...20.16.4</a></p>
<h2>20.16.3</h2>
<h2>What's Changed</h2>
<ul>
<li>release 20.16.2 by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2392">pypa/virtualenv#2392</a></li>
<li>Bump dependencies and build tools by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2394">pypa/virtualenv#2394</a></li>
<li>Bump embed pip and setuptools by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2395">pypa/virtualenv#2395</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pypa/virtualenv/compare/20.16.2...20.16.3">https://github.com/pypa/virtualenv/compare/20.16.2...20.16.3</a></p>
<h2>20.16.2</h2>
<h2>What's Changed</h2>
<ul>
<li>release 20.16.1 by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2390">pypa/virtualenv#2390</a></li>
<li>Bump embed pip by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2391">pypa/virtualenv#2391</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pypa/virtualenv/compare/20.16.1...20.16.2">https://github.com/pypa/virtualenv/compare/20.16.1...20.16.2</a></p>
<h2>20.16.1</h2>
<h2>What's Changed</h2>
<ul>
<li>release 20.16.0 by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2384">pypa/virtualenv#2384</a></li>
<li>Test with CPython 3.11 by <a
href="https://github.com/gaborbernat"><code>@​gaborbernat</code></a> in
<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2388">pypa/virtualenv#2388</a></li>
<li>Fix pull request template formatting by <a
href="https://github.com/kubouch"><code>@​kubouch</code></a> in <a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2389">pypa/virtualenv#2389</a></li>
<li>Port Nushell activation scripts to 0.67 by <a
href="https://github.com/kubouch"><code>@​kubouch</code></a> in <a
href="https://github-redirect.dependabot.com/pypa/virtualenv/pull/2386">pypa/virtualenv#2386</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pypa/virtualenv/compare/20.16.0...20.16.1">https://github.com/pypa/virtualenv/compare/20.16.0...20.16.1</a></p>
<h2>20.16.0</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst">virtualenv's
changelog</a>.</em></p>
<blockquote>
<h2>v20.16.5 (2022-09-07)</h2>
<p>Bugfixes - 20.16.5</p>
<pre><code>- Do not turn echo off for subsequent commands in batch
activators
(``activate.bat`` and ``deactivate.bat``) - by :user:`pawelszramowski`.
(`[#2411](pypa/virtualenv#2411)
&lt;https://github.com/pypa/virtualenv/issues/2411&gt;`_)
<h2>v20.16.4 (2022-08-29)</h2>
<p>Bugfixes - 20.16.4
</code></pre></p>
<ul>
<li>Bump embed setuptools to <code>65.3</code> - by
:user:<code>gaborbernat</code>.
(<code>[#2405](pypa/virtualenv#2405)
&lt;https://github.com/pypa/virtualenv/issues/2405&gt;</code>_)</li>
</ul>
<h2>v20.16.3 (2022-08-04)</h2>
<p>Bugfixes - 20.16.3</p>
<pre><code>- Upgrade embedded pip to ``22.2.2`` from ``22.2.1`` and
setuptools to ``63.4.1`` from ``63.2.0`` - by :user:`gaborbernat`.
(`[#2395](pypa/virtualenv#2395)
&lt;https://github.com/pypa/virtualenv/issues/2395&gt;`_)
<h2>v20.16.2 (2022-07-27)</h2>
<p>Bugfixes - 20.16.2
</code></pre></p>
<ul>
<li>Bump embeded pip from <code>22.2</code> to <code>22.2.1</code> - by
:user:<code>gaborbernat</code>.
(<code>[#2391](pypa/virtualenv#2391)
&lt;https://github.com/pypa/virtualenv/issues/2391&gt;</code>_)</li>
</ul>
<h2>v20.16.1 (2022-07-26)</h2>
<p>Features - 20.16.1</p>
<pre><code>- Update Nushell activation scripts to version 0.67 - by
:user:`kubouch`.
(`[#2386](pypa/virtualenv#2386)
&lt;https://github.com/pypa/virtualenv/issues/2386&gt;`_)
<h2>v20.16.0 (2022-07-25)</h2>
<p>Features - 20.16.0
</code></pre></p>
<ul>
<li>Drop support for running under Python 2 (still can generate Python 2
environments) - by :user:<code>gaborbernat</code>.
(<code>[#2382](pypa/virtualenv#2382)
&lt;https://github.com/pypa/virtualenv/issues/2382&gt;</code>_)</li>
<li>Upgrade embedded pip to <code>22.2</code> from <code>22.1.2</code>
and setuptools to <code>63.2.0</code> from <code>62.6.0</code> -
by :user:<code>gaborbernat</code>.
(<code>[#2383](pypa/virtualenv#2383)
&lt;https://github.com/pypa/virtualenv/issues/2383&gt;</code>_)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pypa/virtualenv/commit/0a7d1edf0fe115d869f3f8cc07c97057e4353091"><code>0a7d1ed</code></a>
release 20.16.5</li>
<li><a
href="https://github.com/pypa/virtualenv/commit/dbedec5ea24abb5b50af88d9946fd6137ef81517"><code>dbedec5</code></a>
Do not turn echo off for subsequent commands in batch activators (<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2411">#2411</a>)
(<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2412">#2412</a>)</li>
<li><a
href="https://github.com/pypa/virtualenv/commit/d9575ee42c52667eecefe368927c073a7f339cef"><code>d9575ee</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2410">#2410</a>)</li>
<li><a
href="https://github.com/pypa/virtualenv/commit/46f68d67c79f2280554f47f3c21265b3a1e899a4"><code>46f68d6</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2407">#2407</a>
from pypa/release-20.16.4</li>
<li><a
href="https://github.com/pypa/virtualenv/commit/27550925aa56229279a5b13d6bb2c334d328e99d"><code>2755092</code></a>
release 20.16.4</li>
<li><a
href="https://github.com/pypa/virtualenv/commit/467f13f1250a083f881caa1dbbb4990fc727fbd4"><code>467f13f</code></a>
Bump setuptools (<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2405">#2405</a>)</li>
<li><a
href="https://github.com/pypa/virtualenv/commit/29bc38cbedce63cff02534dddea2f289bfb7a88e"><code>29bc38c</code></a>
Remove universal wheel, python 2 is unsupported (<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2402">#2402</a>)</li>
<li><a
href="https://github.com/pypa/virtualenv/commit/08b413eca8e6d91cb9b5bfc16a8e14820024a878"><code>08b413e</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2396">#2396</a>
from pypa/release-20.16.3</li>
<li><a
href="https://github.com/pypa/virtualenv/commit/2f8667abaa0e3b96f706635f81efa3c54db076ff"><code>2f8667a</code></a>
release 20.16.3</li>
<li><a
href="https://github.com/pypa/virtualenv/commit/b18f7339f5acc81d13ce10462073f2646eafbb09"><code>b18f733</code></a>
Bump embed pip and setuptools (<a
href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2395">#2395</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pypa/virtualenv/compare/20.15.1...20.16.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=virtualenv&package-manager=pip&previous-version=20.15.1&new-version=20.16.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants