add CLAN_NO_COMMIT env var to disable committing
This is required when calling vars generators for generating vars for tests
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from .cmd import Log, RunOpts, run
|
from .cmd import Log, RunOpts, run
|
||||||
@@ -27,6 +28,8 @@ def commit_files(
|
|||||||
repo_dir: Path,
|
repo_dir: Path,
|
||||||
commit_message: str | None = None,
|
commit_message: str | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
if os.environ.get("CLAN_NO_COMMIT", None):
|
||||||
|
return
|
||||||
if not file_paths:
|
if not file_paths:
|
||||||
return
|
return
|
||||||
# check that the file is in the git repository
|
# check that the file is in the git repository
|
||||||
|
|||||||
Reference in New Issue
Block a user