pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pre-commit/pre-commit/pull/3650/files

a="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-2d31826944fd3be8.css" /> feat(run): warn instead of error when --files is used outside a git repo by vmandela · Pull Request #3650 · pre-commit/pre-commit · GitHub
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion pre_commit/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from pre_commit.commands.validate_config import validate_config
from pre_commit.commands.validate_manifest import validate_manifest
from pre_commit.error_handler import error_handler
from pre_commit.errors import FatalError
from pre_commit.logging_handler import logging_handler
from pre_commit.store import Store

Expand Down Expand Up @@ -185,7 +186,16 @@ def _adjust_args_and_chdir(args: argparse.Namespace) -> None:
if args.command == 'try-repo' and os.path.exists(args.repo):
args.repo = os.path.abspath(args.repo)

toplevel = git.get_root()
try:
toplevel = git.get_root()
except FatalError:
if args.command == 'run' and args.files:
logger.warning(
'pre-commit is running outside a git repository. '
'Only the files passed via `--files` will be checked.',
)
return
raise
os.chdir(toplevel)

args.config = os.path.relpath(args.config)
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy