Skip to content

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented May 26, 2019

In posix path.resolve should handle relative paths to be safe even if process.cwd fails.

At lib/path.js#999:

    return resolvedPath.length > 0 ? resolvedPath : '.';

Else branch wasn't covered.

Add a test case to cover this.

Checklist

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label May 26, 2019
Copy link
Contributor

@ryzokuken ryzokuken left a comment

Choose a reason for hiding this comment

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

LGTM with Anna's comments addressed, thanks!

@ShGKme ShGKme force-pushed the test-path-resolve branch from 459fd9b to e0e7590 Compare May 26, 2019 14:52
@ryzokuken ryzokuken added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label May 26, 2019
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@gireeshpunathil gireeshpunathil added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 27, 2019
@ChALkeR
Copy link
Member

ChALkeR commented May 27, 2019

Please react with 👍for fast-tracking.

@ChALkeR ChALkeR added the fast-track PRs that do not need to wait for 48 hours to land. label May 27, 2019
In posix path.resolve should handle relative paths to be safe
even if process.cwd fails.

At lib/path.js#999:
    return resolvedPath.length > 0 ? resolvedPath : '.';
Else branch wasn't covered.

Add a test case to cover this.

PR-URL: #27905
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
@ChALkeR ChALkeR force-pushed the test-path-resolve branch from e0e7590 to e3555e9 Compare May 27, 2019 14:15
@ChALkeR ChALkeR merged commit e3555e9 into nodejs:master May 27, 2019
@ChALkeR
Copy link
Member

ChALkeR commented May 27, 2019

Landed in e3555e9.

Thanks for the contribution! 🎉

https://www.nodetodo.org/next-steps/ is a good list of ideas on possible next steps. (But the next steps are not limited to just that list -- you can always come up with your own)!

targos pushed a commit that referenced this pull request May 28, 2019
In posix path.resolve should handle relative paths to be safe
even if process.cwd fails.

At lib/path.js#999:
    return resolvedPath.length > 0 ? resolvedPath : '.';
Else branch wasn't covered.

Add a test case to cover this.

PR-URL: #27905
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
@targos targos mentioned this pull request Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants