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

Comma Separated List of Directories Isn't Working #109

Open
Julian88Tex opened this issue Oct 19, 2022 · 2 comments
Open

Comma Separated List of Directories Isn't Working #109

Julian88Tex opened this issue Oct 19, 2022 · 2 comments

Comments

@Julian88Tex
Copy link

      - name: Check For Files To Add
        id: check_additions
        uses: andstor/file-existence-action@v1.1.0
        with:
          files: "changed-sources/force-app, changed-sources/custom-metadata"

I keep getting log message These files don't exist: changed-sources/force-app and then when I check in another action step if: steps.check_additions.outputs.files_exists == 'true' value is apparently false even though the second directory changed-sources/custom-metadata does include files.

Workaround is running action twice and adding an or (||): steps.check_force_additions.outputs.files_exists == 'true' || steps.check_metadata_additions.outputs.files_exists == 'true'

Says here it should work: https://github.com/andstor/file-existence-action/blob/main/README.md?plain=1#L26

@Destreyf
Copy link

@Julian88Tex

I am not sure if you have tested this yet but I recommend testing with a slightly different path structure.

I don't have multiple directories, but I do have files & directories mixed.

Does it work if you change your files line to this?

  files: "./changed-sources/force-app/, ./changed-sources/custom-metadata/"

I've had mixed results with different systems over the years with directories not registering on globs unless they have a trailing slash, and I prefer to prefix my relative paths with ./ to make sure it's clear to the running program that it needs to run relative to the running directory (which should be your workspace).

Hopefully this helps.

@Julian88Tex
Copy link
Author

@Destreyf Thanks so much for this. Whenever I refactor I'll definitely give this a try. In the meantime, I just decided to run sgd twice for now. Once for each folder.

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