kpt icon indicating copy to clipboard operation
kpt copied to clipboard

Can't git checkout the kpt repo on Windows

Open mengqiy opened this issue 3 years ago • 2 comments

We can't do git checkout for the kpt repo on windows: https://github.com/GoogleContainerTools/kpt/runs/7844543379?check_suite_focus=true

There are several files under https://github.com/GoogleContainerTools/kpt/tree/main/package-examples/cert-manager-basic containing : in the file name. e.g. https://github.com/GoogleContainerTools/kpt/blob/main/package-examples/cert-manager-basic/cert-manager/role-cert-manager:leaderelection.yaml. : is considered as invalid on Windows. Is there a reason why we use : as part of the filename? Can we change it to - or _?

@droot @mortent @justinsb @natasha41575

Encountered this issue when working on https://github.com/GoogleContainerTools/kpt/pull/3450.

mengqiy avatar Aug 15 '22 21:08 mengqiy

I ran into this issue too when kyaml virtual filesystem also didn't like :. I fixed that issue by patching kyaml, but perhaps it would be better to write our packages without : to support more general use cases (including windows).

natasha41575 avatar Aug 15 '22 21:08 natasha41575

I imagine the problem is that it's valid in a k8s object name (or some k8s object names), but we should normalize that before using it as a filesystem name. I think it's only going to be :, but there might be others.

It might also be fun to see what happens if an object is called aux: https://www.howtogeek.com/fyi/windows-10-still-wont-let-you-use-these-file-names-reserved-in-1974/

justinsb avatar Aug 17 '22 21:08 justinsb

This should be fixed by #3487

rquitales avatar Nov 03 '22 22:11 rquitales