mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-12-23 13:32:06 +01:00
Refine trimming a bit
This commit is contained in:
parent
35759c8458
commit
8910100981
3 changed files with 33 additions and 9 deletions
20
dist/index.js
vendored
20
dist/index.js
vendored
|
@ -193,11 +193,17 @@ class NixInstallerAction {
|
||||||
});
|
});
|
||||||
spawned.stdout.setEncoding('utf-8');
|
spawned.stdout.setEncoding('utf-8');
|
||||||
spawned.stdout.on('data', data => {
|
spawned.stdout.on('data', data => {
|
||||||
actions_core.info(data.trim());
|
const trimmed = data.trimEnd();
|
||||||
|
if (trimmed.length >= 0) {
|
||||||
|
actions_core.info(trimmed);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
spawned.stderr.setEncoding('utf-8');
|
spawned.stderr.setEncoding('utf-8');
|
||||||
spawned.stderr.on('data', data => {
|
spawned.stderr.on('data', data => {
|
||||||
actions_core.info(data.trim());
|
const trimmed = data.trimEnd();
|
||||||
|
if (trimmed.length >= 0) {
|
||||||
|
actions_core.info(trimmed);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const exit_code = yield new Promise((resolve, _reject) => {
|
const exit_code = yield new Promise((resolve, _reject) => {
|
||||||
spawned.on('close', resolve);
|
spawned.on('close', resolve);
|
||||||
|
@ -242,11 +248,17 @@ class NixInstallerAction {
|
||||||
});
|
});
|
||||||
spawned.stdout.setEncoding('utf-8');
|
spawned.stdout.setEncoding('utf-8');
|
||||||
spawned.stdout.on('data', data => {
|
spawned.stdout.on('data', data => {
|
||||||
actions_core.info(data.trim());
|
const trimmed = data.trimEnd();
|
||||||
|
if (trimmed.length >= 0) {
|
||||||
|
actions_core.info(trimmed);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
spawned.stderr.setEncoding('utf-8');
|
spawned.stderr.setEncoding('utf-8');
|
||||||
spawned.stderr.on('data', data => {
|
spawned.stderr.on('data', data => {
|
||||||
actions_core.info(data.trim());
|
const trimmed = data.trimEnd();
|
||||||
|
if (trimmed.length >= 0) {
|
||||||
|
actions_core.info(trimmed);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const exit_code = yield new Promise((resolve, _reject) => {
|
const exit_code = yield new Promise((resolve, _reject) => {
|
||||||
spawned.on('close', resolve);
|
spawned.on('close', resolve);
|
||||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
20
src/main.ts
20
src/main.ts
|
@ -220,12 +220,18 @@ class NixInstallerAction {
|
||||||
|
|
||||||
spawned.stdout.setEncoding('utf-8')
|
spawned.stdout.setEncoding('utf-8')
|
||||||
spawned.stdout.on('data', data => {
|
spawned.stdout.on('data', data => {
|
||||||
actions_core.info(data.trim())
|
const trimmed = data.trimEnd()
|
||||||
|
if (trimmed.length >= 0) {
|
||||||
|
actions_core.info(trimmed)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
spawned.stderr.setEncoding('utf-8')
|
spawned.stderr.setEncoding('utf-8')
|
||||||
spawned.stderr.on('data', data => {
|
spawned.stderr.on('data', data => {
|
||||||
actions_core.info(data.trim())
|
const trimmed = data.trimEnd()
|
||||||
|
if (trimmed.length >= 0) {
|
||||||
|
actions_core.info(trimmed)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const exit_code: number = await new Promise((resolve, _reject) => {
|
const exit_code: number = await new Promise((resolve, _reject) => {
|
||||||
|
@ -276,12 +282,18 @@ class NixInstallerAction {
|
||||||
|
|
||||||
spawned.stdout.setEncoding('utf-8')
|
spawned.stdout.setEncoding('utf-8')
|
||||||
spawned.stdout.on('data', data => {
|
spawned.stdout.on('data', data => {
|
||||||
actions_core.info(data.trim())
|
const trimmed = data.trimEnd()
|
||||||
|
if (trimmed.length >= 0) {
|
||||||
|
actions_core.info(trimmed)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
spawned.stderr.setEncoding('utf-8')
|
spawned.stderr.setEncoding('utf-8')
|
||||||
spawned.stderr.on('data', data => {
|
spawned.stderr.on('data', data => {
|
||||||
actions_core.info(data.trim())
|
const trimmed = data.trimEnd()
|
||||||
|
if (trimmed.length >= 0) {
|
||||||
|
actions_core.info(trimmed)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const exit_code: number = await new Promise((resolve, _reject) => {
|
const exit_code: number = await new Promise((resolve, _reject) => {
|
||||||
|
|
Loading…
Reference in a new issue