From 80882091c0f20ce4e21fa44bf1f32dab2b37e07d Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 23 Jun 2023 18:19:52 -0400 Subject: [PATCH] fix: logging environment should use reprs (#409) Fixes #403, I think. --- src/scikit_build_core/_shutil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scikit_build_core/_shutil.py b/src/scikit_build_core/_shutil.py index ba600af1..36b298ed 100644 --- a/src/scikit_build_core/_shutil.py +++ b/src/scikit_build_core/_shutil.py @@ -52,11 +52,11 @@ def _run( if self.env: if not self._prev_env: type(self)._prev_env = self.env.copy() - msg = "\n ".join(f"{k}={v}" for k, v in sorted(self.env.items())) + msg = "\n ".join(f"{k}={v!r}" for k, v in sorted(self.env.items())) logger.debug("RUNENV:\n {}", msg) else: msg = "\n ".join( - f"{self._key_diff(k)} {k}={self.env.get(k, '')}" + f"{self._key_diff(k)} {k}={self.env.get(k, '')!r}" for k in sorted(self.env.keys() | self._prev_env.keys()) if self._prev_env.get(k, None) != self.env.get(k, None) )