Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with symlinks #128

Open
lakano opened this issue Jun 8, 2023 · 1 comment
Open

Bug with symlinks #128

lakano opened this issue Jun 8, 2023 · 1 comment

Comments

@lakano
Copy link

lakano commented Jun 8, 2023

Describe the bug
I'm trying to uses it for the 1st time, but I got theses errors, related to a symlink problem

There is a symlink in shop/workers/upload/wrangler.toml that point to « ../../../config/upload.toml »

Locally syncing file(s) between source and target repository
Warning: Source is directory
Error: Cannot copy '../../../config/upload.toml' to a subdirectory of itself, '../../../config/upload.toml'.
Error: Error: Cannot copy '../../../config/upload.toml' to a subdirectory of itself, '../../../config/upload.toml'.
Cleanup complete

My .github/sync.yml file:

our-account/our-repo:

  • .gitignore
  • build.sh
  • shop/
  • static/css/
  • static/js/
  • static/img/ext/
  • static/robots.txt

My .github/workflows/sync.yml file:

name: Synchro
on:
push:
branches:
- main
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run GitHub File Sync
uses: Redocly/repo-file-sync-action@main
with:
GH_PAT: ${{ secrets.GH_PAT }}
COMMIT_BODY: "Synchro"

Then, I've tried to add it in the 'exclude' config like this:

our-account/our-repo:

  • .gitignore
  • build.sh
  • source: shop/
    dest: shop/
    exclude: workers/upload/wrangler.toml
  • static/css/
  • static/js/
  • static/img/ext/
  • static/robots.txt

But I got a new error: « Error: ENOENT: no such file or directory, stat 'tmp-1686XXXX686/github.com/our-account/our-repo@default/shop/workers/account/wrangler.toml'»

Then, I've tried to change with the full path like that:

  • source: shop/
    dest: shop/
    exclude: shop/workers/upload/wrangler.toml

But I got agin the 1st error: « Error: Cannot copy '../../../config/upload.toml' to a subdirectory of itself, '../../../config/upload.toml'. »

Any ideas of a workaround please?

@niemtec
Copy link

niemtec commented Oct 29, 2023

I've seen the same issue when trying to specify the entire repository as a source:

user/repo:
- source: /
   dest: somefolder/

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

No branches or pull requests

2 participants