Skip to content

Commit

Permalink
vsenv: improve error failing to set an env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ylatuya committed Sep 16, 2024
1 parent 570a170 commit 3ed46c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesonbuild/utils/vsenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def _setup_vsenv(force: bool) -> bool:
# there is no "=", ignore junk data
pass
else:
os.environ[k] = v
try:
os.environ[k] = v
except ValueError:
raise MesonException(f'Failed to set environment variable {k} to {v}')
return True

def setup_vsenv(force: bool = False) -> bool:
Expand Down

0 comments on commit 3ed46c2

Please sign in to comment.