mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-01-23 09:32:58 +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 = '';
|
let currentBuildingModule = '';
|
||||||
|
|
||||||
const initCwd = process.cwd();
|
const initCwd = process.cwd();
|
||||||
|
const trimOutput = (data) => {
|
||||||
|
return `[yarn]\t` + data.toString().replace(/\s+$/, '');
|
||||||
|
}
|
||||||
|
|
||||||
const yarnBuildTask = {
|
const yarnBuildTask = {
|
||||||
shouldBuild(resourceName) {
|
shouldBuild(resourceName) {
|
||||||
@ -48,8 +51,8 @@ const yarnBuildTask = {
|
|||||||
cwd: path.resolve(GetResourcePath(resourceName)),
|
cwd: path.resolve(GetResourcePath(resourceName)),
|
||||||
stdio: 'pipe',
|
stdio: 'pipe',
|
||||||
});
|
});
|
||||||
proc.stdout.on('data', (data) => console.log('[yarn]', data.toString()));
|
proc.stdout.on('data', (data) => console.log(trimOutput(data)));
|
||||||
proc.stderr.on('data', (data) => console.error('[yarn]', data.toString()));
|
proc.stderr.on('data', (data) => console.error(trimOutput(data)));
|
||||||
proc.on('exit', (code, signal) => {
|
proc.on('exit', (code, signal) => {
|
||||||
setImmediate(() => {
|
setImmediate(() => {
|
||||||
if (code != 0 || signal) {
|
if (code != 0 || signal) {
|
||||||
|
Loading…
Reference in New Issue
Block a user