Repository: pypa/pipenv

Issue:
Pipfile.lock is updated even with --outdated or --dry-run options.
### Issue description

Pipfile.lock is updated even with `--outdated` or `--dry-run` options.

### Expected result

I would like to check for updates without updating Pipfile.lock.
I am aware that past versions have been able to do that.

### Actual result

Excerpt from `pipenv update --outdated`

```
Loading .env environment variables...
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Locking [packages] dependencies...

Locking [dev-packages] dependencies...

Updated Pipfile.lock (a84a8f578f467dfabb16e4965a8aa3184bbd06893ff0db5f7d152cf646843c34)!

```

-------------------------------------------------------------------------------


<details><summary>$ pipenv --support</summary>

Pipenv version: `'2023.8.26'`

Pipenv location: `'/opt/homebrew/Cellar/pipenv/2023.8.26/libexec/lib/python3.11/site-packages/pipenv'`

Python location: `'/opt/homebrew/Cellar/pipenv/2023.8.26/libexec/bin/python'`

OS Name: `'posix'`

User pip version: `'23.2.1'`

user Python installations found:


PEP 508 Information:

```
{'implementation_name': 'cpython',
 'implementation_version': '3.11.5',
 'os_name': 'posix',
 'platform_machine': 'arm64',
 'platform_python_implementation': 'CPython',
 'platform_release': '22.6.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:53 PDT '
                     '2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020',
 'python_full_version': '3.11.5',
 'python_version': '3.11',
 'sys_platform': 'darwin'}
```
</details>


Discussion:

Resolving patch:
diff --git a/pipenv/routines/update.py b/pipenv/routines/update.py
--- a/pipenv/routines/update.py
+++ b/pipenv/routines/update.py
@@ -44,6 +44,8 @@ def do_update(
     )
     packages = [p for p in packages if p]
     editable = [p for p in editable_packages if p]
+    if not outdated:
+        outdated = bool(dry_run)
     if not packages:
         click.echo(
             "{} {} {} {}{}".format(
@@ -59,7 +61,7 @@ def do_update(
             clear=clear,
             pre=pre,
             pypi_mirror=pypi_mirror,
-            write=not quiet,
+            write=not outdated,
         )
     else:
         upgrade(
@@ -75,8 +77,6 @@ def do_update(
             lock_only=lock_only,
         )
 
-    if not outdated:
-        outdated = bool(dry_run)
     if outdated:
         do_outdated(
             project,
@@ -84,19 +84,19 @@ def do_update(
             pre=pre,
             pypi_mirror=pypi_mirror,
         )
-
-    do_sync(
-        project,
-        dev=dev,
-        categories=categories,
-        python=python,
-        bare=bare,
-        user=False,
-        clear=clear,
-        unused=False,
-        pypi_mirror=pypi_mirror,
-        extra_pip_args=extra_pip_args,
-    )
+    else:
+        do_sync(
+            project,
+            dev=dev,
+            categories=categories,
+            python=python,
+            bare=bare,
+            user=False,
+            clear=clear,
+            unused=False,
+            pypi_mirror=pypi_mirror,
+            extra_pip_args=extra_pip_args,
+        )
 
 
 def upgrade(


Test patch: