mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-01 21:21:10 +00:00
Update register.rs
This commit is contained in:
parent
a0b062a972
commit
a1673e83c9
1 changed files with 5 additions and 4 deletions
|
@ -1370,10 +1370,10 @@ impl Context {
|
||||||
|
|
||||||
fn try_gen_py_decl_file(&self, __name__: &Str) -> Result<PathBuf, ()> {
|
fn try_gen_py_decl_file(&self, __name__: &Str) -> Result<PathBuf, ()> {
|
||||||
if let Ok(path) = self.cfg.input.local_py_resolve(Path::new(&__name__[..])) {
|
if let Ok(path) = self.cfg.input.local_py_resolve(Path::new(&__name__[..])) {
|
||||||
let output = if self.cfg.quiet_repl {
|
let (out, err) = if self.cfg.quiet_repl {
|
||||||
Stdio::null()
|
(Stdio::null(), Stdio::null())
|
||||||
} else {
|
} else {
|
||||||
Stdio::inherit()
|
(Stdio::inherit(), Stdio::inherit())
|
||||||
};
|
};
|
||||||
// pylyzer is a static analysis tool for Python.
|
// pylyzer is a static analysis tool for Python.
|
||||||
// It can convert a Python script to an Erg AST for code analysis.
|
// It can convert a Python script to an Erg AST for code analysis.
|
||||||
|
@ -1382,7 +1382,8 @@ impl Context {
|
||||||
if let Ok(_status) = Command::new("pylyzer")
|
if let Ok(_status) = Command::new("pylyzer")
|
||||||
.arg("--dump-decl")
|
.arg("--dump-decl")
|
||||||
.arg(path.to_str().unwrap())
|
.arg(path.to_str().unwrap())
|
||||||
.stdout(output)
|
.stdout(out)
|
||||||
|
.stderr(err)
|
||||||
.spawn()
|
.spawn()
|
||||||
.and_then(|mut child| child.wait())
|
.and_then(|mut child| child.wait())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue