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(templates): Avoid failing if VSCode IDE config is not requested for target and mapper cookiecutter templates #2342

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

ReubenFrankel
Copy link
Contributor

@ReubenFrankel ReubenFrankel commented Mar 25, 2024

Related to #2182 and #2183

These templates currently do not have a .vscode directory, and so when VSCode IDE config is not requested (i.e. 2 - None option) the post generate project hook fails trying to remove a directory that doesn't exist:

FileNotFoundError: [Errno 2] No such file or directory: '.vscode'
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully

This PR simply ignores that error for target and mapper templates, should it occur. I haven't added any VSCode config (e.g. launch.json) as it's probably not gonna be the same as the tap template (in hindsight, I might have been a bit quick to exclude launch.json from the check-json pre-commit hook).

@ReubenFrankel
Copy link
Contributor Author

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.76%. Comparing base (1d7afa6) to head (368c4fe).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2342   +/-   ##
=======================================
  Coverage   88.76%   88.76%           
=======================================
  Files          54       54           
  Lines        4769     4769           
  Branches      928      928           
=======================================
  Hits         4233     4233           
  Misses        374      374           
  Partials      162      162           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@edgarrmondragon edgarrmondragon left a comment

Choose a reason for hiding this comment

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

Thanks @ReubenFrankel!

@edgarrmondragon edgarrmondragon added this pull request to the merge queue Mar 25, 2024
Merged via the queue into meltano:main with commit 61a5727 Mar 25, 2024
30 checks passed
@ReubenFrankel ReubenFrankel deleted the patch-1 branch March 25, 2024 14:57
Sign up for free to 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.

2 participants