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

vcs repos file existence check fails on Windows #229

Closed
jacobperron opened this issue Jun 8, 2020 · 1 comment
Closed

vcs repos file existence check fails on Windows #229

jacobperron opened this issue Jun 8, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@jacobperron
Copy link
Contributor

Description

I'm trying to point vcs-repo-file-url to a repos file that exists in the root of the same repository as where the action is being run. e.g.:

    vcs-repo-file-url: |
            https://raw.githubusercontent.com/ros2/ros2/dashing/ros2.repos
            "${{ github.workspace }}\ros2_java_desktop.repos"

But, curl fails since the necessary file:// prefix is not being appended by the action.

Expected Behavior

file:// is appended by the logic here:

if (fs.existsSync(vcsRepoFileUrl)) {
return "file://" + path.resolve(vcsRepoFileUrl);
} else {

and curl succeeds.

Actual Behavior

curl fails. For example.

To Reproduce

See example workflow in ros2-java/ros2_java#109.

System (please complete the following information)

  • OS: Windows
  • ROS 2 Distro: Dashing

Additional context

I'm not sure if this is user error, or a bug related to the use of fs.existsSync on Windows.

@jacobperron jacobperron added the bug Something isn't working label Jun 8, 2020
@jacobperron jacobperron changed the title vcs repos file existence fails on Windows vcs repos file existence check fails on Windows Jun 8, 2020
@jacobperron
Copy link
Contributor Author

jacobperron commented Jun 9, 2020

Looks like if I remove the quotation marks ("), then the action works as expected. For example:

    vcs-repo-file-url: |
            https://raw.githubusercontent.com/ros2/ros2/dashing/ros2.repos
-            "${{ github.workspace }}\ros2_java_desktop.repos"
+            ${{ github.workspace }}\ros2_java_desktop.repos

Maybe the action could be more robust to the presence of quotation marks, but seems like user-error on my part.

Edit: I'll note that the quotation marks didn't seem to be a problem on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant