cookiecutter / cookiecutter
Showing 1 of 2 files from the diff.

@@ -218,11 +218,14 @@
Loading
218 218
            logger.debug(
219 219
                'Output directory %s already exists, overwriting it', dir_to_create
220 220
            )
221 +
222 +
            # must be removed for symlink to be created successfully
223 +
            if symlink is not None:
224 +
                shutil.rmtree(dir_to_create)
225 +
221 226
        else:
222 227
            msg = 'Error: "{}" directory already exists'.format(dir_to_create)
223 228
            raise OutputDirExistsException(msg)
224 -
    else:
225 -
        make_sure_path_exists(dir_to_create)
226 229
227 230
    if symlink is not None:
228 231
        link_tmpl = environment.from_string(symlink)
@@ -357,7 +360,9 @@
Loading
357 360
                outdir = os.path.normpath(os.path.join(project_dir, indir))
358 361
                outdir = env.from_string(outdir).render(**context)
359 362
                logger.debug('Copying dir %s to %s without rendering', indir, outdir)
360 -
                shutil.copytree(indir, outdir, symlinks=True)
363 +
                shutil.copytree(
364 +
                    indir, outdir, symlinks=True, dirs_exist_ok=overwrite_if_exists
365 +
                )
361 366
362 367
            # We mutate ``dirs``, because we only want to go through these dirs
363 368
            # recursively
Files Coverage
cookiecutter 100.00%
Project Totals (18 files) 100.00%
1009836835
PYTHON=3.8==3.8
OS=macos-latest==macos-latest
1009836835
PYTHON=3.9==3.9
OS=ubuntu-latest==ubuntu-latest
1009836835
PYTHON=3.8==3.8
OS=windows-latest=Windows_NT=windows-latest
1009836835
PYTHON=3.9==3.9
OS=macos-latest==macos-latest
1009836835
PYTHON=3.8==3.8
OS=ubuntu-latest==ubuntu-latest
1009836835
PYTHON=3.9==3.9
OS=windows-latest=Windows_NT=windows-latest
1
# comment spam as user can always click the failed coverage check
2
comment: false
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading