fix: npx stdin command's child process stderr logging

This commit is contained in:
Isaac 2023-11-20 17:12:45 +00:00
parent 53e4d2d631
commit 296002e04f
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -13,6 +13,6 @@ module.exports = class extends StdinCommand {
if (!input[0]) return this.client.log.warn('Usage: npx <command> [args]');
const child = spawn('npx', input, { shell: true });
for await (const data of child.stdout) this.client.log.info('npx:', data.toString());
for await (const data of child.stderr) this.client.warn.info('npx:', data.toString());
for await (const data of child.stderr) this.client.log.warn('npx:', data.toString());
}
};
};