mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-01-23 01:12:57 +08:00
fix: removed empty lines from the build stdout (#225)
* fix: removed empty lines from the build stdout * revert: undone unwanted changes
This commit is contained in:
parent
3e8e6dfc01
commit
0e7ba53833
@ -5,6 +5,9 @@ let buildingInProgress = false;
|
||||
let currentBuildingModule = '';
|
||||
|
||||
const initCwd = process.cwd();
|
||||
const trimOutput = (data) => {
|
||||
return `[yarn]\t` + data.toString().replace(/\s+$/, '');
|
||||
}
|
||||
|
||||
const yarnBuildTask = {
|
||||
shouldBuild(resourceName) {
|
||||
@ -48,8 +51,8 @@ const yarnBuildTask = {
|
||||
cwd: path.resolve(GetResourcePath(resourceName)),
|
||||
stdio: 'pipe',
|
||||
});
|
||||
proc.stdout.on('data', (data) => console.log('[yarn]', data.toString()));
|
||||
proc.stderr.on('data', (data) => console.error('[yarn]', data.toString()));
|
||||
proc.stdout.on('data', (data) => console.log(trimOutput(data)));
|
||||
proc.stderr.on('data', (data) => console.error(trimOutput(data)));
|
||||
proc.on('exit', (code, signal) => {
|
||||
setImmediate(() => {
|
||||
if (code != 0 || signal) {
|
||||
|
Loading…
Reference in New Issue
Block a user