Skip to content

When installed from git/vcs, original folder not deleted #22

@Youdaman

Description

@Youdaman

Hi, I have a repo setup using SatisPress where I have a custom plugin that has the following file structure:

foo/

  • foo.php
  • composer.json
  • .gitignore
  • .git/

If I setup my website's composer.json with the following:

   "dropin-paths": {
      "wp-content/mu-plugins/": ["type:wordpress-muplugin", "package:repo/foo:foo.php"]
    },

Then it installs the plugin as an muplugin correctly, i.e. it ends up having only wp-content/mu-plugins/foo.php

However if I set it up using git instead:

"repositories": [
   {
      "type": "vcs",
      "url": "https://[email protected]/baz/foo.git"
    }
]

and

   "dropin-paths": {
      "wp-content/mu-plugins/": ["type:wordpress-muplugin", "package:baz/foo:foo.php"]
    },

When it installs it leaves behind the original directory, i.e. wp-content/mu-plugins/foo.php along with wp-content/mu-plugins/foo/ (and in that directory is the composer.json, .git/ and .gitignore).

So in summary, pulling from a repo works as expected, moving the specified file and deleting the original directory, but pulling from vcs/git does not delete the original directory after the move.

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