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

fix: use copyFileSync from node #1313

Merged
merged 1 commit into from
Jun 30, 2020

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jun 30, 2020

Issue #, if available:
Fixes: #1312

Description of changes:
use copyFileSync from node instead of fs-extra

Verified that yarn generate-clients succeeds to fix the bug:

$ yarn generate-clients -m ~/Downloads/temp
yarn run v1.22.4
$ node ./scripts/generate-clients -m /home/trivikr/Downloads/temp
preparing models from /home/trivikr/Downloads/temp...
copying model s3.2006-03-01.json...

...

child process exited with code 0
copying @aws-sdk/client-s3 from /local/home/trivikr/workspace/aws-sdk-js-v3/codegen/sdk-codegen/build/smithyprojections/sdk-codegen/s3.2006-03-01/typescript-codegen to /local/home/trivikr/workspace/aws-sdk-js-v3/clients
copying @aws-sdk/aws-ec2 from /local/home/trivikr/workspace/aws-sdk-js-v3/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/aws-ec2/typescript-codegen to /local/home/trivikr/workspace/aws-sdk-js-v3/protocol_tests
copying @aws-sdk/aws-json from /local/home/trivikr/workspace/aws-sdk-js-v3/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/aws-json/typescript-codegen to /local/home/trivikr/workspace/aws-sdk-js-v3/protocol_tests
copying @aws-sdk/aws-query from /local/home/trivikr/workspace/aws-sdk-js-v3/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/aws-query/typescript-codegen to /local/home/trivikr/workspace/aws-sdk-js-v3/protocol_tests
copying @aws-sdk/aws-restjson from /local/home/trivikr/workspace/aws-sdk-js-v3/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/aws-restjson/typescript-codegen to /local/home/trivikr/workspace/aws-sdk-js-v3/protocol_tests
copying @aws-sdk/aws-restxml from /local/home/trivikr/workspace/aws-sdk-js-v3/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/aws-restxml/typescript-codegen to /local/home/trivikr/workspace/aws-sdk-js-v3/protocol_tests
Done in 13.43s.

generate-clients also succeed in other cases:

  • yarn generate-clients
  • yarn generate-clients -g codegen/sdk-codegen/aws-models/s3.2006-03-01.json

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr merged commit 8ea8e73 into aws:master Jun 30, 2020
@trivikr trivikr deleted the use-copyFileSync-from-node branch June 30, 2020 22:38
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn generate-clients -m throws TypeError [ERR_INVALID_ARG_TYPE]
2 participants