google / google/google-java-format

Fails to format files with a space in the path

Ouverte
#421 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
6.2k
Forks
937
Merge moyen
6 min
PR mergées (30 j)
3

Description

I am running google-java-format on a Windows machine. When I provide it a file (with the "@" syntax) containing a list of files to format, it will fail to format files that contain a space in the path. Example:

```
>type files.lst
C:\path\with\a space\Some.java

>java -jar google-java-format.jar @files.lst
Skipping non-Java file: C:\path\with\a
space\Some.java: could not read file: space\Some.java
```

Placing double-quotes around the path does not work, either.

It _does_, however, handle passing in the filenames in the command string, provided they are surrounded by double-quotes, e.g.:

```
>java -jar google-java-format.jar "C:\path\with\a space\Some.java"
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.