Skip to content

Support installing a new package directly from command line #465

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

Closed
DartBot opened this issue Jun 5, 2015 · 3 comments
Closed

Support installing a new package directly from command line #465

DartBot opened this issue Jun 5, 2015 · 3 comments
Labels
closed-duplicate Closed in favor of an existing report contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

Originally opened as dart-lang/sdk#8815

This issue was originally filed by [email protected]


It would be nice if we could do something like

pub install web_ui

and it would add the dependency to the bottom on the local pubspec.yaml (or create a pubspec if one doesn't exist), and then it would perform the normal installation. Extra params with that command could be used to specify versions, etc.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Right now, pub doesn't ever actually modify a pubspec. Programmatically modifying a file that a user hand-edits as well tends to be pretty nasty, especially with a flexible language like YAML. I think it's unlikely that we'll want to do that in pub.

It would be useful to be able to tell pub to install a package to the system cache, though, without touching the pubspec. That could be useful if you know you're about to not have network access and want to "pre-cache" a package.

Once we have better support for packages that expose command-line apps, it will also be necessary to be able to install and use a package that you don't have an actual dependency on.

I'll leave this bug open for that latter case.


Added this to the Later milestone.
Removed Priority-Low label.
Added Priority-Medium label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added Community-StarterBug label.

@DartBot DartBot added closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug Priority-Medium labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added Duplicate label.
Marked as being merged into #407.

@DartBot DartBot closed this as completed Jun 5, 2015
@nex3 nex3 added the contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) label Jun 5, 2015
sigurdm pushed a commit to sigurdm/pub that referenced this issue Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants