Skip to content

Fix postinstall script for Windows - #370

Merged
louiszawadzki merged 1 commit into
developfrom
louiszawadzki/fix-postinstall-for-windows
Jan 9, 2023
Merged

Fix postinstall script for Windows#370
louiszawadzki merged 1 commit into
developfrom
louiszawadzki/fix-postinstall-for-windows

Conversation

@louiszawadzki

@louiszawadzkilouiszawadzki commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes#358
Executes the postinstall script without any slash in the command.
There are different ways to execute the script, the solution is the only one I found working for *nix and windows:

scripts/replace-react-require.js

  • ✅ *nix
  • ❌ Windows: slashes make it fail

./replace-react-require.js (moving the file at the root)

  • ✅ *nix
  • ❌ Windows: slashes make it fail

replace-react-require.js

  • ❌ *nix: interpreted as a command, not executing script
  • ✅ Windows

node scripts/replace-react-require.js or node replace-react-require.js

  • ✅ *nix
  • ✅ Windows

Motivation

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@louiszawadzkilouiszawadzki changed the title Move postinstall script at root of projectFix postinstall script for WindowsJan 4, 2023
@louiszawadzki
louiszawadzki marked this pull request as ready for review January 9, 2023 09:37
@louiszawadzki
louiszawadzki requested a review from a team as a code ownerJanuary 9, 2023 09:37
@louiszawadzki
louiszawadzkiforce-pushed the louiszawadzki/fix-postinstall-for-windows branch from 5302aff to 2b8ad7eCompareJanuary 9, 2023 09:43
0xnm
0xnm approved these changes Jan 9, 2023
@louiszawadzki
louiszawadzki merged commit 40cec69 into developJan 9, 2023
@louiszawadzki
louiszawadzki deleted the louiszawadzki/fix-postinstall-for-windows branch January 9, 2023 13:09
@louiszawadzkilouiszawadzki mentioned this pull request Jan 12, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

can't install @datadog/mobile-react-native

3 participants

@louiszawadzki@xgouchet@0xnm