mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-12-23 05:22:21 +01:00
Trim logging and encode stdout/stderr
This commit is contained in:
parent
3bae1cc12f
commit
35759c8458
3 changed files with 17 additions and 9 deletions
12
dist/index.js
vendored
12
dist/index.js
vendored
|
@ -191,11 +191,13 @@ class NixInstallerAction {
|
|||
const spawned = (0, node_child_process_1.spawn)(`${binary_path}`, args, {
|
||||
env: merged_env
|
||||
});
|
||||
spawned.stdout.setEncoding('utf-8');
|
||||
spawned.stdout.on('data', data => {
|
||||
actions_core.info(data);
|
||||
actions_core.info(data.trim());
|
||||
});
|
||||
spawned.stderr.setEncoding('utf-8');
|
||||
spawned.stderr.on('data', data => {
|
||||
actions_core.info(data);
|
||||
actions_core.info(data.trim());
|
||||
});
|
||||
const exit_code = yield new Promise((resolve, _reject) => {
|
||||
spawned.on('close', resolve);
|
||||
|
@ -238,11 +240,13 @@ class NixInstallerAction {
|
|||
env: Object.assign({ NIX_INSTALLER_NO_CONFIRM: 'true' }, process.env // To get $PATH, etc
|
||||
)
|
||||
});
|
||||
spawned.stdout.setEncoding('utf-8');
|
||||
spawned.stdout.on('data', data => {
|
||||
actions_core.info(data);
|
||||
actions_core.info(data.trim());
|
||||
});
|
||||
spawned.stderr.setEncoding('utf-8');
|
||||
spawned.stderr.on('data', data => {
|
||||
actions_core.info(data);
|
||||
actions_core.info(data.trim());
|
||||
});
|
||||
const exit_code = yield new Promise((resolve, _reject) => {
|
||||
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
12
src/main.ts
12
src/main.ts
|
@ -218,12 +218,14 @@ class NixInstallerAction {
|
|||
env: merged_env
|
||||
})
|
||||
|
||||
spawned.stdout.setEncoding('utf-8')
|
||||
spawned.stdout.on('data', data => {
|
||||
actions_core.info(data)
|
||||
actions_core.info(data.trim())
|
||||
})
|
||||
|
||||
spawned.stderr.setEncoding('utf-8')
|
||||
spawned.stderr.on('data', data => {
|
||||
actions_core.info(data)
|
||||
actions_core.info(data.trim())
|
||||
})
|
||||
|
||||
const exit_code: number = await new Promise((resolve, _reject) => {
|
||||
|
@ -272,12 +274,14 @@ class NixInstallerAction {
|
|||
}
|
||||
})
|
||||
|
||||
spawned.stdout.setEncoding('utf-8')
|
||||
spawned.stdout.on('data', data => {
|
||||
actions_core.info(data)
|
||||
actions_core.info(data.trim())
|
||||
})
|
||||
|
||||
spawned.stderr.setEncoding('utf-8')
|
||||
spawned.stderr.on('data', data => {
|
||||
actions_core.info(data)
|
||||
actions_core.info(data.trim())
|
||||
})
|
||||
|
||||
const exit_code: number = await new Promise((resolve, _reject) => {
|
||||
|
|
Loading…
Reference in a new issue