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

💡 - can I use \n in the path parameter? #46

Open
eliotik opened this issue Jul 24, 2024 · 2 comments
Open

💡 - can I use \n in the path parameter? #46

eliotik opened this issue Jul 24, 2024 · 2 comments

Comments

@eliotik
Copy link

eliotik commented Jul 24, 2024

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

N/A

Describe alternatives you've considered

N/A

Additional context

I pass to the action as a value for path as following:

        path: |
          ${{ steps.detect-package-manager.outputs.cache-path }}

where steps.detect-package-manager.outputs.cache-path value is node_modules\n!node_modules/.cache
will it actually work?
Value determined automatically in a detect-package-manager step. Depending on a repository we have different package managers.
Result of interpolation:

        path: |
          node_modules\n!node_modules/.cache

or should it be

        path: |
          node_modules
          !node_modules/.cache
@eliotik
Copy link
Author

eliotik commented Jul 24, 2024

Based on this https://github.com/tespkg/actions-cache/blob/main/src/utils.ts#L63 looks like i can simply do:

        path: "node_modules\n!node_modules/.cache"

@eliotik
Copy link
Author

eliotik commented Jul 24, 2024

Looks like it doesn't work, from debug log of workflow execution:

##[debug]Search path '/home/runner/work/hub-api/hub-api/node_modulesn!node_modules/.cache'
##[debug]Cache Paths:
##[debug][]

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

1 participant