[GH-ISSUE #209] Doesn't copy symlinks #143

Closed
opened 2026-03-01 21:40:36 +03:00 by kerem · 8 comments
Owner

Originally created by @pascalwhoop on GitHub (Apr 26, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/209

We're using symlinks in our git repo to keep our terraform code DRY. Doesn't really matter to act, but generally, if GIT supports symlinks, so should act

[Apply Terraform/apply terraform] Unable to copy link providers.tf --> ../_universal/providers.tf
[Apply Terraform/apply terraform] Unable to copy link universal.auto.tfvars --> ../_universal/universal.auto.tfvars
[Apply Terraform/apply terraform] Unable to copy link providers.tf --> ../_universal/providers.tf
[Apply Terraform/apply terraform] Unable to copy link universal.auto.tfvars --> ../_universal/universal.auto.tfvars
[Apply Terraform/apply terraform] Unable to copy link providers.tf --> ../_universal/providers.tf
[Apply Terraform/apply terraform] Unable to copy link universal.auto.tfvars --> ../_universal/universal.auto.tfvars
Originally created by @pascalwhoop on GitHub (Apr 26, 2020). Original GitHub issue: https://github.com/nektos/act/issues/209 We're using symlinks in our git repo to keep our terraform code DRY. Doesn't really matter to act, but generally, if GIT supports symlinks, so should act ``` [Apply Terraform/apply terraform] Unable to copy link providers.tf --> ../_universal/providers.tf [Apply Terraform/apply terraform] Unable to copy link universal.auto.tfvars --> ../_universal/universal.auto.tfvars [Apply Terraform/apply terraform] Unable to copy link providers.tf --> ../_universal/providers.tf [Apply Terraform/apply terraform] Unable to copy link universal.auto.tfvars --> ../_universal/universal.auto.tfvars [Apply Terraform/apply terraform] Unable to copy link providers.tf --> ../_universal/providers.tf [Apply Terraform/apply terraform] Unable to copy link universal.auto.tfvars --> ../_universal/universal.auto.tfvars ```
kerem 2026-03-01 21:40:36 +03:00
Author
Owner

@nilsdebruin commented on GitHub (May 7, 2020):

Hi, I can confirm that this is broken in version 0.2.8, when I downgraded to 0.2.7 it works as expected (MacOSX Catalina, installed via HomeBrew)

<!-- gh-comment-id:625268117 --> @nilsdebruin commented on GitHub (May 7, 2020): Hi, I can confirm that this is broken in version 0.2.8, when I downgraded to 0.2.7 it works as expected (MacOSX Catalina, installed via HomeBrew)
Author
Owner

@cplee commented on GitHub (May 13, 2020):

Likely related to github.com/nektos/act@8c290994c1

<!-- gh-comment-id:628275296 --> @cplee commented on GitHub (May 13, 2020): Likely related to https://github.com/nektos/act/commit/8c290994c1b84153d2b9f911ac3bb64858fb5e35
Author
Owner

@lyleunderwood commented on GitHub (Jun 19, 2020):

Why was this necessary? Was there an issue associated with this?

<!-- gh-comment-id:646820309 --> @lyleunderwood commented on GitHub (Jun 19, 2020): Why was [this](https://github.com/nektos/act/commit/c44b71c9962f527e9c8847a7a3b959c71ac41b21) necessary? Was there an issue associated with this?
Author
Owner

@Nilegfx commented on GitHub (Aug 2, 2020):

any updates regarding this?
When I downgrade to 0.2.7, as @nilsdebruin mentioned, the error disappeared but copying symlinks didn't work fine.

isn't it solved by adding -L here according to docker documentation for cp command here

<!-- gh-comment-id:667604934 --> @Nilegfx commented on GitHub (Aug 2, 2020): any updates regarding this? When I downgrade to `0.2.7`, as @nilsdebruin mentioned, the error disappeared but copying symlinks didn't work fine. isn't it solved by adding `-L` [here](https://github.com/nektos/act/blob/2097a3c017a93c58437d7f7915fc60877e5d9e65/pkg/container/docker_run.go#L110) according to docker documentation for [cp command here](https://docs.docker.com/engine/reference/commandline/cp/#options)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 2, 2020):

Issue is stale and will be closed in 7 days unless there is new activity

<!-- gh-comment-id:702463847 --> @github-actions[bot] commented on GitHub (Oct 2, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@lyleunderwood commented on GitHub (Oct 2, 2020):

@cplee does the above look familiar to you?

<!-- gh-comment-id:702881636 --> @lyleunderwood commented on GitHub (Oct 2, 2020): @cplee does the above look familiar to you?
Author
Owner

@cplee commented on GitHub (Oct 2, 2020):

@lyleunderwood - this was for #182

<!-- gh-comment-id:702980037 --> @cplee commented on GitHub (Oct 2, 2020): @lyleunderwood - this was for #182
Author
Owner

@lyleunderwood commented on GitHub (Oct 2, 2020):

Oh, hm. It looks like the output referenced in the original issue is describing the fact that the contents of a symlink are not copied to the tar archive, because a symlink doesn't really have contents. The file headers for the symlinks are still written to the archive, which I believe should be enough for them to be untar'd correctly. It seems like the real question here is, do symlinks actually not show up alongside the other copied files? It seems like they should, in which case the warning should probably be squelched.

github.com/nektos/act@729adec5e5/pkg/container/docker_run.go (L386-L410)

<!-- gh-comment-id:703003194 --> @lyleunderwood commented on GitHub (Oct 2, 2020): Oh, hm. It looks like the output referenced in the original issue is describing the fact that the _contents_ of a symlink are not copied to the tar archive, because a symlink doesn't really have contents. The file headers for the symlinks are still written to the archive, which I believe should be enough for them to be untar'd correctly. It seems like the real question here is, do symlinks _actually_ not show up alongside the other copied files? It seems like they should, in which case the warning should probably be squelched. https://github.com/nektos/act/blob/729adec5e52eb8bf83fb3ea1cc0d1b510350e09e/pkg/container/docker_run.go#L386-L410
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#143
No description provided.