Skip to content
Discussion options

You must be logged in to vote

I found solution.

// in ace Command

public async run() {
    const { exitCode } = await execa.node('./node-commands/dir.js', ["-lh", "./"], {
        stdio: 'inherit',
    })
}

// node-commands/dir.js

const { spawn } = require("child_process");
const ls = spawn("ls", ["-lh", "/usr"]);
ls.stdout.on("data", (data) => {
    console.log(`stdout: ${data}`);
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by magic-thomas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant