bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
15.03k stars 1.25k forks source link

Installation fails with readonly profile #573

Open Nemo157 opened 4 years ago

Nemo157 commented 4 years ago
> curl https://wasmtime.dev/install.sh -sSf | bash
  Installing latest version of Wasmtime (dev)
    Checking for existing Wasmtime installation
    Fetching archive for macOS, version dev
https://github.com/cranestation/wasmtime/releases/download/dev/wasmtime-dev-x86_64-macos.tar.xz
######################################################################## 100.0%
    Creating directory layout
  Extracting Wasmtime binaries
x wasmtime-dev-x86_64-macos/
x wasmtime-dev-x86_64-macos/README.md
x wasmtime-dev-x86_64-macos/wasmtime
x wasmtime-dev-x86_64-macos/LICENSE
x wasmtime-dev-x86_64-macos/wasm2obj
     Editing user profile (/Users/nemo157/.zshrc)
bash: line 217: /Users/nemo157/.zshrc: Permission denied
bjorn3 commented 4 years ago

I think that the installation is fine, but wasmtime is just not yet in your PATH, as your .zshrc is readonly.

Nemo157 commented 4 years ago

Should have mentioned: the installer exited with result 1 as well, so I don't know whether the installer planned to do anything else after this step?

I've now added ~/.wasmtime/bin to my PATH in .zprofile and it appears to work.

Also, editing a users config files without telling them just seems wrong to me. It would be nice to have options to disable this like rustup's installer has. I have a carefully constructed rc/profile file, which is why I have it readonly to avoid installers messing with it.