question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Symlinks become normal directories when cookiecutter is run

See original GitHub issue
  • Cookiecutter version: master
  • Template project url:
  • Python version: 3.5
  • Operating System: OSX

Description:

Symlinks within cookiecutter templates are copied as directories rather than as symlinks.

What I’ve run:

Here’s a cookiecutter template with just the name variable in cookiecutter.json:

12:42 $ tree symlink-cc/
symlink-cc/
├── cookiecutter.json
└── {{\ cookiecutter.name\ }}
    ├── original
    │   └── afile.txt
    └── symlink -> original

I can successfully run cookiecutter.

12:38 $ cookiecutter symlink-cc
name [pjb]: pjb

In the output, the symlink turns into a standard directory.

12:42 $ tree pjb/
pjb/
├── original
│   └── afile.txt
└── symlink

Working on a PR that should fix this.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
michaeljosephcommented, Dec 7, 2016

Nice catch @pjbull! We look forward to your PR 😃

1reaction
seanhcommented, Jul 7, 2022

Symlinks become normal directories when cookiecutter is run I believe this is the intended behavior of cookiecutter and we have cookiecutters that rely on this feature

Read more comments on GitHub >

github_iconTop Results From Across the Web

Symlinks become normal directories when cookiecutter is run
Symlinks within cookiecutter templates are copied as directories rather than as symlinks. What I've run: Here's a cookiecutter template with ...
Read more >
cookiecutter Documentation - Read the Docs
Cookiecutter takes a template provided as a directory structure with template-files. Templates can be located in the.
Read more >
Organizing cookiecutters in directories (1.7+) - Read the Docs
Cookiecutter introduces the ability to organize several templates in one repository or zip file, separating them by directories. This allows using symlinks ......
Read more >
How to get cookiecutter to output to current working directory ...
So, add a directory to contain the template files and try and output it to a particular directory. template/ cookiecutter.json {{cookiecutter.
Read more >
uWSGI with cookiecutter Pyramid Application Part 2
This guide will outline broad steps that can be used to add the uWSGI ... In order to run our cookiecutter application with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found