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

add system.setenv #1706

Merged
merged 6 commits into from
Jan 22, 2024
Merged

add system.setenv #1706

merged 6 commits into from
Jan 22, 2024

Conversation

CosmicToast
Copy link
Contributor

Resolves #1702
There's some potential expanding to do later, but the functionality works on POSIX-compatible systems as a minimum (I don't have a windows machine to test the win32 code, but from what I can tell it should be ok).

src/api/system.c Outdated Show resolved Hide resolved
src/api/system.c Outdated Show resolved Hide resolved
Copy link
Member

@Guldoman Guldoman left a comment

Choose a reason for hiding this comment

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

Could you also document the function in docs/api/system.lua?

src/api/system.c Outdated Show resolved Hide resolved
@CosmicToast CosmicToast requested a review from Guldoman January 21, 2024 17:18
Copy link
Member

@Guldoman Guldoman left a comment

Choose a reason for hiding this comment

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

I think we can already implement returning the success status, but obviously SetEnvironmentVariableW returns the exact opposite of setenv so we need specific code for each...

src/api/system.c Outdated Show resolved Hide resolved
src/api/system.c Show resolved Hide resolved
src/api/system.c Show resolved Hide resolved
@Guldoman Guldoman merged commit 1a5fd97 into lite-xl:master Jan 22, 2024
10 checks passed
@Guldoman
Copy link
Member

Thank you!

@CosmicToast CosmicToast deleted the setenv branch February 2, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add way to set environment variables
3 participants