mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +02:00
Fix
This commit is contained in:
@@ -34,7 +34,7 @@ module.exports = class ExecCommand extends Command {
|
|||||||
|
|
||||||
exec(command) {
|
exec(command) {
|
||||||
try {
|
try {
|
||||||
const stdout = execSync(command, { timeout: 30000 });
|
const stdout = execSync(command, { timeout: 30000, encoding: 'utf8' });
|
||||||
return { err: false, std: stdout.trim() };
|
return { err: false, std: stdout.trim() };
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return { err: true, std: err.stderr.trim() };
|
return { err: true, std: err.stderr.trim() };
|
||||||
|
|||||||
Reference in New Issue
Block a user