Open blackeuler opened 8 months ago
Thanks for reporting this! To set expectations:
Finally, please be patient with the core team. They are trying their best with limited resources.
Is this a request for a better error message in this case?
What is an example of an environment where the process lacks permission?
defaults to using the the location of elm
Maybe this is more a problem of the environment. The name getAppUserDataDirectory implies a location that is writable by the current user. If it is giving the location of the elm executable then that's a problem - I wouldn't expect the executable location to be writable in most distros.
Sorry that was my Interpretation of the getAppUserDataDirectory
. Im not sure where exactly it was trying to write to. This came up when trying to automate some things with elm make. We were calling elm make
from another program process. It all worked locally but then we ran into the createDirectory permissionDenied
error when deploying it on fly.io. I think there should be a nicer error message handled by elm. #2042 references a similar issue
Description
When running the Elm compiler without the
ELM_HOME
environment variable set, it defaults to using the the location of elm im assuming for storing data. In certain environments, the process may lack the necessary permissions to write to this directory, resulting in aPermission Denied
error.This issue stems from the
getElmHome
function within theStuff
module in the Elm compiler source code. Below is the relevant snippet from theStuff
module:In the absence of the
ELM_HOME
environment variable,getElmHome
defaults to usingAppUserDataDirectory
.Steps to Reproduce
ELM_HOME
environment variable is not set.AppUserDataDirectory
is not writable by the process.Permission Denied
error.