Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console message causing problems for stdout of n8n cli #9211

Open
jmls opened this issue Apr 24, 2024 · 2 comments
Open

console message causing problems for stdout of n8n cli #9211

jmls opened this issue Apr 24, 2024 · 2 comments

Comments

@jmls
Copy link

jmls commented Apr 24, 2024

Bug Description

When using the n8n cli, we're now getting a message "User settings loaded from ... " before any output

If you have a program that expects just the json output (as we do) or you want to pipe that output through another process then you have an extra non-json line to have to remove

This message is only output in a non-test environment

packages/core/src/InstanceSettings.ts

const inTest = process.env.NODE_ENV === 'test';
[snip]
if (!inTest) console.info(`User settings loaded from: ${this.settingsFile}`);

To Reproduce

  1. n8n export:credentials --all

Expected behavior

only the output of the cli command should show in the console, not any "debug" info

Operating System

Ubuntu Linux 22.04

n8n Version

1.35.0

Node.js Version

18.20.0

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Apr 24, 2024

Hey @jmls,

I will have a think about this one and how we handle it, technically nothing is broken here as the cli doesn't exclusively output JSON so we don't have anything to fix which would make this more of an enhancement than a bug.

It does however make sense that we don't show the extra information when used with some output options.

@jmls
Copy link
Author

jmls commented Apr 24, 2024

Thanks, it was more of a change in behavior that then broke our processing that's the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants