Skip to content

Commit 55f459c

Browse files
committed
checkpoint
1 parent 2378933 commit 55f459c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- "v*.*"
8+
- jk-tmp
89
jobs:
910
linux:
1011
runs-on: ubuntu-22.04

c_src/pythonx.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,11 @@ fine::Ok<> init(ErlNifEnv *env, std::string python_dl_path,
408408
auto py_value_guard = PyDecRefGuard(py_value);
409409

410410
auto result = PyObject_SetItem(py_os_environ, py_key, py_value);
411+
if (result == -1) {
412+
// Log the problematic key before raising
413+
fprintf(stderr, "Failed to set env var: '%s' (len=%zu)\n",
414+
std::string(reinterpret_cast<const char *>(key.data), key.size).c_str(), key.size);
415+
}
411416
raise_if_failed(env, result);
412417
}
413418

0 commit comments

Comments
 (0)