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

OS.get_environment("something") delivers correct value despite OS.has_environment("something") reports false #96521

Closed
Franz-Inc opened this issue Sep 3, 2024 · 1 comment · Fixed by #96526

Comments

@Franz-Inc
Copy link

Tested versions

  • Reproducible in 4.3 stable, 4.2 stable, 4.1.1 stable

System information

Windows 11 x86_64 · 64 bit (not tested on .net version). This bug not reproducible on MacOS.

Issue description

After using OS.set_environment to set a custom variable to a value, OS.has_environment still results in false, despite OS.get_environment still delivers the set value.

Steps to reproduce

Reproduce using the following code (as included in the MRP):

extends Node

func _ready() -> void:
	OS.set_environment("something", "hello")
	print("called OS.set_environment for 'something' with value 'hello'.")
	print("OS.has_environment('something'): ", OS.has_environment("something"))
	print("OS.get_environment('something'): ", OS.get_environment("something"))

Outcome is:

called OS.set_environment for 'something' with value 'hello'.
OS.has_environment('something'): false
OS.get_environment('something'): hello

Minimal reproduction project (MRP)

environment-test.zip

@akien-mga
Copy link
Member

CC @bruvzg

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

Successfully merging a pull request may close this issue.

4 participants