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] Git checkout fails on Windows #140

Closed
knz-ru opened this issue Jun 29, 2021 · 2 comments
Closed

[BUG] Git checkout fails on Windows #140

knz-ru opened this issue Jun 29, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@knz-ru
Copy link

knz-ru commented Jun 29, 2021

Describe the bug
Git checkout fails due to trailing dot in folder cli/src/test/resources/com/google/prefab/cli/packages/missing_artifact_id/modules/missing_id/libs/android./ which is illegal folder name in Windows

To Reproduce
Steps to reproduce the behavior:

  1. Start Git Bash
  2. git clone https://github.com/google/prefab.git prefab

Expected behavior
Clone and checkout complete without problems

Logs
$ git clone https://github.com/google/prefab.git prefab
Cloning into 'prefab'...
remote: Enumerating objects: 1473, done.
remote: Counting objects: 100% (373/373), done.
remote: Compressing objects: 100% (197/197), done.
remote: Total 1473 (delta 68), reused 330 (delta 49), pack-reused 1100
Receiving objects: 100% (1473/1473), 266.02 KiB | 2.31 MiB/s, done.
Resolving deltas: 100% (349/349), done.
error: invalid path 'cli/src/test/resources/com/google/prefab/cli/packages/missing_artifact_id/modules/missing_id/libs/android./.keep'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

Environment:
Prefab version: 1.1.3

Host OS: Windows

@knz-ru knz-ru added the bug Something isn't working label Jun 29, 2021
@DanAlbert
Copy link
Member

That test is specifically testing the behavior for a folder name that ends with a dot, so the easy fix (rename the directory) breaks the test. The only way around it that comes to mind would be generating all the test inputs dynamically when running the tests and skipping this test on Windows. It would be a lot of work and since it's a JAR there's no actual need to build this on Windows. Given all my other responsibilities that's not going to be a priority any time soon, but I'd be happy to review a PR.

@DanAlbert
Copy link
Member

#168 fixed this a while ago.

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

2 participants