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

tools: fix update-eslint.sh #14850

Merged
merged 1 commit into from
Aug 18, 2017
Merged

Conversation

MylesBorins
Copy link
Contributor

The script currently assumes that there is a package.json in
eslint-tmp. If there isn't the logic of the script fails.
This adds a call to npm init --yes ensuring there is a package.json
and that the script can do it's thing.

@MylesBorins MylesBorins requested a review from Trott August 16, 2017 07:05
@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Aug 16, 2017
@targos
Copy link
Member

targos commented Aug 16, 2017

It doesn't fail for me

@Trott
Copy link
Member

Trott commented Aug 16, 2017

Fail vs. not fail perhaps dependent on whether or not you are using a recent npm?

@targos
Copy link
Member

targos commented Aug 16, 2017

@MylesBorins can you post the error that you get?

@Trott
Copy link
Member

Trott commented Aug 16, 2017

The script currently assumes that there is a package.json in eslint-tmp

That is certainly incorrect as the empty directory is created just a few lines above. If anything, the script assumes the directory is empty.

I just tested with a few npm versions going back to 2.15.11 and can't replicate a problem. Definitely interested in seeing the error you're getting...

@MylesBorins
Copy link
Contributor Author

npm's default behavior is to search up the file system for a package.json, I probably have an erroneous package.json somewhere on the filesystem.

I think it is good to be explicit here

@Trott
Copy link
Member

Trott commented Aug 16, 2017

Confirmed!

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@targos
Copy link
Member

targos commented Aug 16, 2017

Does it help to run the command with --no-save ?

@MylesBorins
Copy link
Contributor Author

MylesBorins commented Aug 16, 2017 via email

The script currently assumes that there is a package.json in
`eslint-tmp`. If there isn't the logic of the script fails.
This adds a call to `npm init --yes` ensuring there is a package.json
and that the script can do it's thing.

PR-URL: nodejs#14850
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
@MylesBorins
Copy link
Contributor Author

landed in fb73256

@MylesBorins MylesBorins merged commit fb73256 into nodejs:master Aug 18, 2017
MylesBorins added a commit that referenced this pull request Sep 10, 2017
The script currently assumes that there is a package.json in
`eslint-tmp`. If there isn't the logic of the script fails.
This adds a call to `npm init --yes` ensuring there is a package.json
and that the script can do it's thing.

PR-URL: #14850
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Sep 10, 2017
MylesBorins added a commit that referenced this pull request Sep 12, 2017
The script currently assumes that there is a package.json in
`eslint-tmp`. If there isn't the logic of the script fails.
This adds a call to `npm init --yes` ensuring there is a package.json
and that the script can do it's thing.

PR-URL: #14850
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
MylesBorins added a commit that referenced this pull request Sep 20, 2017
The script currently assumes that there is a package.json in
`eslint-tmp`. If there isn't the logic of the script fails.
This adds a call to `npm init --yes` ensuring there is a package.json
and that the script can do it's thing.

PR-URL: #14850
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Sep 20, 2017
@MylesBorins MylesBorins deleted the fix-update-eslint branch November 14, 2017 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants