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

Output should mention installation method #942

Open
Daniel15 opened this issue Oct 12, 2016 · 4 comments
Open

Output should mention installation method #942

Daniel15 opened this issue Oct 12, 2016 · 4 comments

Comments

@Daniel15
Copy link
Member

Daniel15 commented Oct 12, 2016

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
When running yarn commands, it includes the version number:

$ yarn install
yarn install v0.15.0
info No lockfile found.
success Nothing to install.

This is very useful, particularly with bug reports (as anyone that includes the full output with the bug report will automatically include the version number.

What is the expected behavior?
It would be useful to also include the installation method in that output. For example, when installed from the Debian/Ubuntu repo:

$ yarn install
yarn install v0.15.0-deb
info No lockfile found.
...

Similarly, when installed via Windows installer:

yarn install v0.15.0-msi

Or from tarball:

yarn install v0.15.0-tarball

Some bugs are specific to certain installation methods, so we end up having to ask "Did you install through the Ubuntu package, the tarball, or npm?" in some bug reports.

This would require the packaging scripts to make a modification to some file to signify the installation method, and something at runtime to read that file.

@FLGMwt
Copy link
Contributor

FLGMwt commented Oct 13, 2016

Should every run of a program optimize for but reports, or would maybe this enchancement and the version declaration as it exists be reserved for a yarn --version?

@Daniel15
Copy link
Member Author

I figured that it doesn't add much overhead so it's fine always displaying it wherever we show the version, but only displaying the info on yarn --version is a good idea.

@olingern
Copy link
Contributor

olingern commented Oct 22, 2016

@Daniel15 To continue with your examples, there are a number of ways to get Yarn. So, are you thinking something like the following?

tarball
yarn install v0.15.0-tarball

brew
yarn install v0.15.0-brew

msi
yarn install v0.15.0-msi

Chocolatey
yarn install v0.15.0-choco

CentOS / Fedora / RHEL
yarn install v0.15.0-rpm

Solus
yarn install v0.15.0-eopkg

Arch Linux
yarn install v0.15.0-aur

Shell Script
yarn install v0.15.0-sh

npm
yarn install v0.15.0-npm

@Daniel15 Daniel15 assigned Daniel15 and unassigned Daniel15 Oct 23, 2016
@Daniel15
Copy link
Member Author

@olingern - Tarball and shell script are essentially the same (the shell script just downloads and extracts the tarball). Right now, the Solus and Arch packages are not official, I'm not sure how those packages are being built (probably using the tarball) so I don't know how we'd record the installation method for those. Maybe I'll look into how those packages are built, and add them to our official build scripts.

Daniel15 added a commit to Daniel15/yarn that referenced this issue Oct 30, 2016
Daniel15 added a commit to Daniel15/yarn that referenced this issue Oct 30, 2016
@Daniel15 Daniel15 self-assigned this Oct 30, 2016
sebmck pushed a commit that referenced this issue Nov 1, 2016
* Add installationMethod property to package.json

References #1139, #942, #1429, #1138

* Make set-installation-method.js executable
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

5 participants