Skip to content

Address comments, improve checks#4

Merged
rtonsing merged 7 commits intomainfrom
eric-comments
Mar 28, 2026
Merged

Address comments, improve checks#4
rtonsing merged 7 commits intomainfrom
eric-comments

Conversation

@rtonsing
Copy link
Copy Markdown
Contributor

@rtonsing rtonsing commented Mar 25, 2026

Address at least some of the comments.

Rearranged README to document all the pieces, needs much more work.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors environment/config handling and adds stronger preflight checks to the host-update and git-pull utilities, with a small README update to reflect behavior.

Changes:

  • Add .env loading and new/updated environment-variable validation in updatehosts.py and gitpull.py.
  • Add an --update-gitpull mode and improve scp error handling/logging in updatehosts.py.
  • Add source-repo accessibility checking and tweak destination path handling in gitpull.py; update README text accordingly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
updatehosts.py Adds .env loading, new required-env checks, and an --update-gitpull flow using scp.
gitpull.py Adds .env loading, validates source repo with git ls-remote, adjusts origin/destination handling, and updates repo-cleanup behavior.
README.md Updates behavior description regarding createdir behavior (but currently mismatched with actual CLI flag).
Comments suppressed due to low confidence (1)

gitpull.py:302

  • target_path = Path(args.target_path).resolve() resolves ~ as a literal directory name (relative to CWD). This can cause the existence/creation check to operate on the wrong path, while destination later uses expanduser(). Use expanduser() before resolve() for target_path so validation/creation and destination are consistent.
    target_path = Path(args.target_path).resolve()
    if not target_path.exists() or not target_path.is_dir():
        if args.createdirs:
            # Create the target directory if it doesn't exist
            logger.info(f"Creating target directory: {target_path}")
            try:
                target_path.mkdir(parents=True, exist_ok=True)
            except Exception as e:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rtonsing rtonsing merged commit 2156722 into main Mar 28, 2026
@rtonsing rtonsing deleted the eric-comments branch March 28, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants