sync-settings icon indicating copy to clipboard operation
sync-settings copied to clipboard

Support for installing package from git urls

Open dangh opened this issue 5 years ago • 2 comments
trafficstars

Is your feature request related to a problem? Please describe.

This is a feature request.

apm is allow us to install package from github/gitlab/bitbucket but sync-settings doesn't support that.

Describe the solution you'd like

If the package is a git source, use the install source to construct apm arguments.

Here's an example of git package info:

{
  "name": "atom-tabs",
  "version": null,
  "apmInstallSource": {
    "type": "git",
    "source": "dangh/atom-tabs",
    "sha": "9264913b95450bb6ea4ad01338059376a47531ab"
  }
}

The command I use to install my package from github:

apm install dangh/atom-tabs

The command sync-settings constructed:

apm install atom-tabs

Describe alternatives you've considered

Maybe we can use atom API to install package instead of apm and skipping constructing the command. But I'm not familiar with atom API to say if it's possible to do so.

dangh avatar Jun 01 '20 10:06 dangh

I don't think there is an Atom API to install the packages. The settings-view package just uses apm to install and update packages.

UziTech avatar Jun 01 '20 14:06 UziTech

Just wondering if a minimal change to https://github.com/atom-community/sync-settings/blob/80c61f5f628960d2e1da3e9106fd9fc595145617/lib/utils/utils.js#L326-L331 would be enough...

Something like this :

if (atom.config.get('sync-settings.installLatestVersion')) {
  pkg.version = null
}
if (pkg.apmInstallSource) {
  pkg.name = pkg.apmInstallSource.source
  pkg.version = null
}

I'll test it and give results here.

TibboddiT avatar Aug 23 '20 10:08 TibboddiT