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

On Windows, specify standard directories from the installer script instead of Rust code #123

Open
agersant opened this issue Dec 27, 2020 · 0 comments
Labels

Comments

@agersant
Copy link
Owner

This is a follow-up to #122

In Polaris 0.13.0, we were using compile-time environment variables to specify the folders where static and user files should be stored. However, these variables included %LOCALAPPDATA% and expanded to values containing the profile name used within Github Actions (C:\Users\runneradmin\...). Running the resulting Polaris executables would lead to servers trying to read/write files in incorrect locations (unless the user happens to be named runneradmin).

Since Windows executables are meant to be created by Github Actions, we should keep un-expanded %LOCALAPPDATA% in the compile-time variables and expand it at runtime. These release script changes were made (and commented out) in the fix for #122.

There is currently no convenient way to expand a PathBuf containing environment variables into a full path. The closest to an existing solution is ShellExpand but it does not seem to support Windows-style % syntax for environment variables.

@agersant agersant changed the title On Windows, specify standard directories from the installer script instead Rust code On Windows, specify standard directories from the installer script instead of Rust code Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant