dbuenzli / cmdliner

Declarative definition of command line interfaces for OCaml
http://erratique.ch/software/cmdliner
ISC License
296 stars 56 forks source link

Cannot install to directory with spaces #172

Closed ZSFactory closed 1 year ago

ZSFactory commented 1 year ago

Here is the issue: (I'm using Diskuv Ocaml 1.1.0 on Windows 11)

#=== ERROR while installing cmdliner.1.1.1 ====================================#
# context              2.2.0~alpha0~20221104 | win32/x86_64 | ocaml-system.4.14.0 | pinned(https://erratique.ch/software/cmdliner/releases/cmdliner-1.1.1.tbz)
# path                 C:\Users\Alex Grant\AppData\Local\opam\playground\.opam-switch\build\cmdliner.1.1.1
# command              C:\Users\ALEXGR~1\AppData\Local\Programs\DISKUV~1\bin\WITH-D~1.EXE make install LIBDIR=C:\Users\Alex Grant\AppData\Local\opam\playground\lib\cmdliner DOCDIR=C:\Users\Alex Grant\AppData\Local\opam\playground\doc\cmdliner
# exit-code            2
# env-file             C:\Users\Alex Grant\AppData\Local\opam\log\cmdliner-13664-276e09.env
# output-file          C:\Users\Alex Grant\AppData\Local\opam\log\cmdliner-13664-276e09.out
### output ###
# install -d C:\Users\Alex Grant\AppData\Local\opam\playground\lib\cmdliner
# install: cannot change permissions of 'C:\\Users/Alex': No such file or directory
# make: *** [Makefile:61: create-libdir] Error 1

I believe the fix will be putting quotes around the make install arguments.

cc: @jonahbeckford

dbuenzli commented 1 year ago

Thanks for the report. I tried doing what you suggest in e8f8890. Could you please:

opam pin cmdliner --dev

to confirm that it solves the issue.

heades commented 1 year ago

Thanks for the report. I tried doing what you suggest in e8f8890. Could you please:

opam pin cmdliner --dev

to confirm that it solves the issue.

I can confirm that this does indeed work. Thanks for the fix!

ZSFactory commented 1 year ago

Thanks for the report. I tried doing what you suggest in e8f8890. Could you please:

opam pin cmdliner --dev

to confirm that it solves the issue.

Yes this works. Thank you for the fix! Apologies for the later response.

dbuenzli commented 1 year ago

Cool no problem, thanks to both. I'll push a release in the upcoming days.