Skip to content

settings.local.php should not refer to the app's bundled copy of Composer #63

@bircher

Description

@bircher

On Linux (I am on Ubuntu) the appimage filesystem is mounted with a different temporary name each time the app is launched.
So the first time you open the application composer runs and drupal is set up settings.php is written to etc.
But it writes something like the following:

$config['package_manager.settings']['executables']['composer'] = '/tmp/.mount_DrupalSWj6q3/resources/app/bin/composer/bin/composer';

As you can see .mount_DrupalSWj6q3 is the appimage filesystem for the first launch. When I close the app and open it again, I can see that now the folder is called .mount_DrupalKquR27 (both by looking in the /tmp/ directory and also in the developer browser tools and looking at the resources.

Of course this breaks project browser as composer can not be run.
I don't know what the correct solution is that works in all environments, but maybe we can use the environment variable APPDIR (in my crude var_dump(getenv()) experiment it is set correctly to the appimage base path. But maybe it is only set when using appimage?
["APPDIR"]=> string(24) "/tmp/.mount_DrupalKquR27"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions