Skip to content

Conversation

@benjick
Copy link
Contributor

@benjick benjick commented Feb 18, 2017

PR for issue #12444

In validateProjectName in react-native-cli name.match is called but it's not certain that nameis a String. This casts nameto a String before doing the match.

I didn't find any tests for this file so I didn't add any.

Reproduce:

cd react-native-cli
npm install
node index.js init 123

Before this PR the code throws an exception, after this PR the intended console.error is printed.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. GH Review: review-needed labels Feb 18, 2017
@janicduplessis
Copy link
Contributor

👍

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

@janicduplessis has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

GaborWnuk pushed a commit to GaborWnuk/react-native that referenced this pull request Feb 28, 2017
Summary:
PR for issue facebook#12444

In `validateProjectName` in `react-native-cli` `name.match` is called but it's not certain that `name`is a String. This casts `name`to a String before doing the match.

I didn't find any tests for this file so I didn't add any.

Reproduce:
```
cd react-native-cli
npm install
node index.js init 123
```

Before this PR the code throws an exception, after this PR the intended `console.error` is printed.
Closes facebook#12447

Differential Revision: D4584041

fbshipit-source-id: 117e76570aa9975ac851192b030c5a77daf19bcc
dudeinthemirror pushed a commit to dudeinthemirror/react-native that referenced this pull request Mar 1, 2017
Summary:
PR for issue facebook#12444

In `validateProjectName` in `react-native-cli` `name.match` is called but it's not certain that `name`is a String. This casts `name`to a String before doing the match.

I didn't find any tests for this file so I didn't add any.

Reproduce:
```
cd react-native-cli
npm install
node index.js init 123
```

Before this PR the code throws an exception, after this PR the intended `console.error` is printed.
Closes facebook#12447

Differential Revision: D4584041

fbshipit-source-id: 117e76570aa9975ac851192b030c5a77daf19bcc
dudeinthemirror pushed a commit to dudeinthemirror/react-native that referenced this pull request Mar 1, 2017
Summary:
PR for issue facebook#12444

In `validateProjectName` in `react-native-cli` `name.match` is called but it's not certain that `name`is a String. This casts `name`to a String before doing the match.

I didn't find any tests for this file so I didn't add any.

Reproduce:
```
cd react-native-cli
npm install
node index.js init 123
```

Before this PR the code throws an exception, after this PR the intended `console.error` is printed.
Closes facebook#12447

Differential Revision: D4584041

fbshipit-source-id: 117e76570aa9975ac851192b030c5a77daf19bcc
grabbou pushed a commit to react-native-community/cli that referenced this pull request Sep 28, 2018
Summary:
PR for issue #12444

In `validateProjectName` in `react-native-cli` `name.match` is called but it's not certain that `name`is a String. This casts `name`to a String before doing the match.

I didn't find any tests for this file so I didn't add any.

Reproduce:
```
cd react-native-cli
npm install
node index.js init 123
```

Before this PR the code throws an exception, after this PR the intended `console.error` is printed.
Closes facebook/react-native#12447

Differential Revision: D4584041

fbshipit-source-id: 117e76570aa9975ac851192b030c5a77daf19bcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants