Skip to content

Commit 8489df9

Browse files
authored
Fix pants run --debug-adapter. (#125)
This fixes `scie-pants` to work with `pants run --debug-adapter` by not setting an empty `PANTS_DEBUGPY_VERSION` env var.
1 parent 8135d57 commit 8489df9

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

CHANGES.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release Notes
22

3+
## 0.5.2
4+
5+
This release fixes `scie-pants` to interoperate with `pants run --debug-adapter`. Previously, if
6+
there was no custom `[debugpy] version` configured, `scie-pants` would cause Pants to error by
7+
passing the empty string as the `debugpy` `version` requirement string via `PANTS_DEBUGPY_VERSION=`.
8+
39
## 0.5.1
410

511
This release silences Pip notifications about new Pip versions being available. The Pip used by

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ members = [
66
[package]
77
name = "scie-pants"
88
description = "Protects your Pants from the elements."
9-
version = "0.5.1"
9+
version = "0.5.2"
1010
edition = "2021"
1111
authors = [
1212
"John Sirois <[email protected]>",

src/main.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,10 @@ fn get_pants_process() -> Result<Process> {
224224
"PANTS_DEBUG".into(),
225225
if pants_debug { "1" } else { "" }.into(),
226226
),
227-
(
228-
"PANTS_DEBUGPY_VERSION".into(),
229-
debugpy_version.unwrap_or_default().into(),
230-
),
231227
];
228+
if let Some(debugpy_version) = debugpy_version {
229+
env.push(("PANTS_DEBUGPY_VERSION".into(), debugpy_version.into()));
230+
}
232231
if let Some(ref build_root) = build_root {
233232
env.push((
234233
"PANTS_BUILDROOT_OVERRIDE".into(),

0 commit comments

Comments
 (0)