Skip to content

Commit 6fd3d4f

Browse files
committed
++
1 parent 9f5732b commit 6fd3d4f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

mod.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ std::string pyexec_for_string(std::string const& cmd) {
104104
KERR << ex;
105105
throw;
106106
}
107-
return kul::String::LINES(pc.outs())[0]; // DROP EOL
107+
auto ret = kul::String::LINES(pc.outs())[0];
108+
if(ret.back() == '\n') ret.pop_back();
109+
if(ret.back() == '\r') ret.pop_back();
110+
return ret;
108111
}
109112

110113
class ModuleMaker : public maiken::Module {

0 commit comments

Comments
 (0)