Skip to content

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>
if [ -n "$env_diff" ]; then
echo
echo
echo "==================== Current environment ========================"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should say instead "Changes to environment after sourcing this script" or similar. Nice!

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