Skip to content

Commit

Permalink
meson: avoid bogus meson warning
Browse files Browse the repository at this point in the history
With meson-0.52.0-1.module_f31+6771+f5d842eb.noarch I get:
src/test/meson.build:19: WARNING: Overriding previous value of environment variable 'PATH' with a new one

When we're using *prepend*, the whole point is to modify an existing variable,
so meson shouldn't warn. But let's set avoid the warning and shorten things by
setting the final value immediately.

(cherry picked from commit cbe8049)

Related: #2030027
  • Loading branch information
keszybz authored and dtardon committed Dec 9, 2021
1 parent 733cbc9 commit 90b0ed0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ test_hashmap_ordered_c = custom_target(

test_include_dir = include_directories('.')

path = run_command('sh', ['-c', 'echo "$PATH"']).stdout()
path = run_command('sh', ['-c', 'echo "$PATH"']).stdout().strip()
test_env = environment()
test_env.set('SYSTEMD_KBD_MODEL_MAP', kbd_model_map)
test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
test_env.set('PATH', path)
test_env.prepend('PATH', meson.build_root())
test_env.set('PATH', '@0@:@1@'.format(meson.build_root(), path))

############################################################

Expand Down

0 comments on commit 90b0ed0

Please sign in to comment.