Skip to content

Reduced noise in detect-environment#2109

Open
larsewi wants to merge 4 commits intocfengine:masterfrom
larsewi:noice
Open

Reduced noise in detect-environment#2109
larsewi wants to merge 4 commits intocfengine:masterfrom
larsewi:noice

Conversation

@larsewi
Copy link
Contributor

@larsewi larsewi commented Feb 11, 2026

Build Status

The -u option enables unified diff which makes it look a little nicer.
It uses +/- instead of </>. However, -u is not supported on HP-UX which
causes the following output to be printed instead:

```
21:28:47 ==================== Current environment ========================
21:28:47 diff: illegal option -- u
21:28:47 	usage: diff [ -C n ] [ -S name ] [ -bcefhilnrstw ] dir1 dir2
21:28:47 		diff [-C n ] [ -bcefhintw ] file1 file2
21:28:47 		diff [ -D string ] [ -biw ] file1 file2
21:28:47 =================================================================
```

I also changed the output to only be printed if there is an actual
change in the environment. This way, we won't print the environment
every time this script is sourced.

Ticket: ENT-12619
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
This script is sourced many times and causes a lot of noise. All these
log messages are redunant, in that the same information is printed in
the end of the file.

Ticket: ENT-12619
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Ticket: ENT-12619
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants