npryce / adr-tools

Command-line tools for working with Architecture Decision Records
Other
4.63k stars 588 forks source link

adr init with spaces in "alternate-dir" path fails #72

Open brokosz opened 6 years ago

brokosz commented 6 years ago

Doing an adr init with a path that has spaces in it fails; then uses the default.

:~$ mkdir path\ with\ spaces
:~$ cd path\ with\ spaces/
:~/path with spaces$ adr init
/usr/local/Cellar/adr-tools/3.0.0/bin/_adr_dir: line 16: [: too many arguments
doc/adr/0001-record-architecture-decisions.md
chipbite commented 2 years ago

Yupo, still there. Hmm.. is there an active fork...

austinrscott commented 2 years ago

I'm experiencing this too

EDIT: I was experiencing it in release 3.0.0 but yeah, the fix is on line 16 of the src/_adr_dir file: -while [ $(absdir $reldir) != / ] +while [ "$(absdir $reldir)" != / ]

The issue disappears after that is changed.