mirror of
https://github.com/Hopiu/djLint.git
synced 2026-03-27 18:50:25 +00:00
17 lines
474 B
JavaScript
Executable file
17 lines
474 B
JavaScript
Executable file
const {spawn} = require('child_process');
|
|
var dataToSend;
|
|
const python = spawn('python3', ['-m', 'pip', 'install', '--upgrade','--quiet', '-r', '../requirements.txt'], {"cwd": "./src"});
|
|
|
|
|
|
python.stdout.on('data', function (data) {
|
|
dataToSend += data.toString();
|
|
});
|
|
|
|
python.stderr.on('data', function (data) {
|
|
dataToSend += data.toString();
|
|
});
|
|
|
|
python.on('close', (code) => {
|
|
process.stdout.write(dataToSend.replace("undefined",""))
|
|
process.exit(code)
|
|
});
|