atom-package-dependencies icon indicating copy to clipboard operation
atom-package-dependencies copied to clipboard

Automatically install dependents

Open travs opened this issue 11 years ago • 5 comments

I am looking for a way around forcing devs to include apd.install() in their code to install depended-on packages.

Is there any way to perform a function on package install when atom-package-dependencies is included in dependencies of the package?

travs avatar Nov 20 '14 19:11 travs

If you can break your dependency on the atom global, it seems like this could be done via a postinstall script

nevir avatar Feb 03 '15 05:02 nevir

postinstall script is run in a modified environment, so it's not likely to work as expected...

lierdakil avatar Feb 05 '15 06:02 lierdakil

A "postinstall": "HOME=\"$HOME\"/../.. apm install <dep>" appears to work (in a *nix world at least) - though the CLI tool doesn't appear to inform any running copy of atom, so activating packages is still an issue :(

nevir avatar Feb 05 '15 06:02 nevir

This is what I'd call "fragile", since it assumes a little too much about environment and running shell. It is bound to break in some cases :disappointed:

lierdakil avatar Feb 05 '15 07:02 lierdakil

Yup!

On Wed, Feb 4, 2015, 23:50 Nikolay Yakimov [email protected] wrote:

This is what I'd call "fragile", since it assumes a little too much about environment and running shell. It is bound to break in some cases [image: :disappointed:]

— Reply to this email directly or view it on GitHub https://github.com/travs/atom-package-dependencies/issues/3#issuecomment-73007226 .

nevir avatar Feb 05 '15 16:02 nevir