Skip to content

Commit

Permalink
fix: don't overwrite existing configs
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed May 13, 2020
1 parent 8440e65 commit dabbcbc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion synthtool/languages/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ def py_samples(*, root: PathOrStr = None, skip_readmes: bool = False) -> None:
sample_readme_metadata = _get_sample_readme_metadata(sample_project_dir)
# Don't generate readme if there's no metadata
if sample_readme_metadata == {}:
excludes.append("**/*README.rst")
excludes.append("**/README.rst")

if Path(sample_project_dir / "noxfile_config.py").exists():
# Don't overwrite existing noxfile configs
excludes.append("**/noxfile_config.py")

result = t.render(subdir=sample_project_dir, **sample_readme_metadata)
_tracked_paths.add(result)
Expand Down

0 comments on commit dabbcbc

Please sign in to comment.