Skip to content

Commit dd40b7c

Browse files
committed
fix: add trailing newline to init-options.json output
`save_init_options()` omitted a final newline, causing `end-of-file-fixer` from .pre-commit-config.yaml (#3430) to flag a diff on every `specify integration upgrade` run. Append `\n` to the `json.dumps()` output to match POSIX expectations and align with `integration_state.py` which already includes the trailing newline. Ref: #3430
1 parent 654793b commit dd40b7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/specify_cli/_init_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def save_init_options(project_path: Path, options: dict[str, Any]) -> None:
1414
dest = project_path / INIT_OPTIONS_FILE
1515
dest.parent.mkdir(parents=True, exist_ok=True)
1616
dest.write_text(
17-
json.dumps(options, indent=2, sort_keys=True, ensure_ascii=False),
17+
json.dumps(options, indent=2, sort_keys=True, ensure_ascii=False) + "\n",
1818
encoding="utf-8",
1919
)
2020

0 commit comments

Comments
 (0)