Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for installing package from git urls #511

Open
dangh opened this issue Jun 1, 2020 · 2 comments
Open

Support for installing package from git urls #511

dangh opened this issue Jun 1, 2020 · 2 comments

Comments

@dangh
Copy link

dangh commented Jun 1, 2020

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.

@UziTech
Copy link
Member

UziTech commented Jun 1, 2020

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.

@TibboddiT
Copy link

TibboddiT commented Aug 23, 2020

Just wondering if a minimal change to

if (atom.config.get('sync-settings.installLatestVersion')) {
pkg.version = null
} else if (pkg.apmInstallSource) {
pkg.name = pkg.apmInstallSource.source
pkg.version = null
}
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants