Skip to content

fix: absolute path resolution for directory flag in pull instance#56

Open
Ishant5436 wants to merge 2 commits into
powersync-ja:mainfrom
Ishant5436:fix-directory-path
Open

fix: absolute path resolution for directory flag in pull instance#56
Ishant5436 wants to merge 2 commits into
powersync-ja:mainfrom
Ishant5436:fix-directory-path

Conversation

@Ishant5436

@Ishant5436 Ishant5436 commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Fixes an issue where providing an absolute path to the --directory flag incorrectly appended the absolute path to the current working directory.

Changes

  • src/utils.ts: updated resolveProjectDir to use path.resolve for proper absolute path resolution
  • src/commands/pull/instance.ts: updated the log message to print the actual projectDir instead of the raw flag value

Testing

  • Local execution confirms that --directory /absolute/path resolves correctly
  • Existing unit tests pass successfully

Closes #55

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@stevensJourney stevensJourney left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the contribution! I still have to test this locally, but generally the change seems good to me.

Can you please add a Changeset for this change via pnpm changeset add and also sign the CLA. Thanks!

@Ishant5436

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@Ishant5436

Copy link
Copy Markdown
Author

hey @stevensJourney, I already pushed the changeset in a subsequent commit! Let me know if everything looks good on your end when you test locally. Also just left a comment signing the CLA.

@LucDeCaf

LucDeCaf commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Hey @Ishant5436, thanks for taking the time to contribute!

We use a tool https://cla-assistant.io to help us manage the CLA signing, and checks will fail until the CLA is signed on that platform specifically. You can sign it using this link (https://cla-assistant.io/powersync-ja/powersync-cli?pullRequest=56) or by clicking the link in the comment left by @CLAassistant. Thanks again!

@Ishant5436 Ishant5436 changed the title fix --directory absolute path resolution in powersync pull instance fix: absolute path resolution for directory flag in pull instance Jun 11, 2026
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.

--directory with an absolute path writes files to the wrong location (concatenated with cwd) in powersync pull instance

4 participants