Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Feb 12, 2025

Description

Use the provider log function instead of the console.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Related Issues

Reviewers


Important

Replace console logging with a custom log function in ShadowCheckpointService and fix file path in getDiff().

  • Logging:
    • Replace console.warn with this.log in initShadowGit() for .gitattributes read errors.
    • Replace console.error with this.log in stageAll(), getShadowGitConfigWorktree(), and saveCheckpoint() for error logging.
  • File Handling:
    • Fix file path in getDiff() by changing fs.readFile(relPath, "utf8") to fs.readFile(absPath, "utf8").

This description was created by Ellipsis for 7de31e1. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2025

⚠️ No Changeset found

Latest commit: 7de31e1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

const after = to
? await this.git.show([`${to}:${relPath}`]).catch(() => "")
: await fs.readFile(relPath, "utf8").catch(() => "")
: await fs.readFile(absPath, "utf8").catch(() => "")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This should be absPath (like it is in the other checkpoints service).

@mrubens mrubens merged commit 88e3662 into main Feb 13, 2025
9 checks passed
@mrubens mrubens deleted the cte/logging-tweaks branch February 13, 2025 00:33
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.

3 participants