-
Notifications
You must be signed in to change notification settings - Fork 824
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
Wasmer cli requires admin privilege on Windows due to cache #2454
Comments
I will have a try on this issue since most of you are using MacOs ... |
Confirmed the bug. If we use: Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName: "WASMER_CACHE_DIR"; \
ValueData: "{app}\cache"; Flags: preservestringtype The This line will trigger an error. @syrusakbary , why did we replace |
@chenyukang I did it that way because a user may have different versions of Wasmer installed in different folders and I wanted to associate the configuration with the installation. This was required for testing However, I did not know that would trigger an error though. We can roll back partially that commit, or think on other solutions? |
If users want to specify a cache directory, they can set an environment variable WASMER_CACHE_DIR, otherwise, /// Get the cache dir
pub fn get_cache_dir() -> PathBuf {
match env::var("WASMER_CACHE_DIR") {
Ok(dir) => {
let mut path = PathBuf::from(dir);
path.push(VERSION);
path
}
Err(_) => {
// We use a temporal directory for saving cache files
let mut temp_dir = env::temp_dir();
temp_dir.push("wasmer");
temp_dir.push(VERSION);
temp_dir
}
}
} What do you think? |
2474: Fix windows cache permission r=syrusakbary a=chenyukang # Description Fix issue #2454 , default `WASMER_CACHE_DIR` is not right for Windows. Add more detailed messages for creating cache directory failure. close #2454. Co-authored-by: chenyukang <[email protected]> Co-authored-by: yukang <[email protected]>
Describe the bug
Trying to run a wasm module with the wasmer cli in a normal user level cli results in:
Windows 10 using Wasmer 2.0 installed from the Windows Installer in the release.
Steps to reproduce
From a user-privilege cli run:
wasmer <some wasm file>
Expected behavior
I expect the cli to be able to run and cache build results in user accessible folders. I do not expect to need admin privileges to run wasmer.
Additional context
Workarounds:
In a user-privilege cli disable the cache:
Run from a cmd with admin privledges:
Edit: The wasm file used: https://wapm.io/package/rajsite/exorbitant
The text was updated successfully, but these errors were encountered: