mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-24 04:23:57 +03:00
14 lines
270 B
TypeScript
14 lines
270 B
TypeScript
|
import { exec } from 'child_process';
|
||
|
|
||
|
export async function sh(cmd) {
|
||
|
return new Promise((resolve, reject) => {
|
||
|
exec(cmd, (err, stdout, stderr) => {
|
||
|
if (err) {
|
||
|
reject(err);
|
||
|
} else {
|
||
|
resolve({ stdout, stderr });
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
}
|