Skip to content

Commit

Permalink
Adr init with spaces in "alternate-dir" path fails
Browse files Browse the repository at this point in the history
Fixes npryce#72
  • Loading branch information
dvaillant committed Jan 30, 2019
1 parent 9220859 commit 78b0d16
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/_adr_dir
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function absdir() {
(cd $(dirname $1) && pwd -P)
}

while [ $(absdir $reldir) != / ]
while [ "$(absdir $reldir)" != / ]
do
if [ -f $(mkrel .adr-dir) ]
then
Expand Down
12 changes: 12 additions & 0 deletions tests/alternative-dir-with-space.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mkdir dir\ with\ space
cd dir\ with\ space
adr init alt-dir-with-space
alt-dir-with-space/0001-record-architecture-decisions.md

ls .
alt-dir-with-space
ls alt-dir-with-space
0001-record-architecture-decisions.md

adr list
alt-dir-with-space/0001-record-architecture-decisions.md
8 changes: 8 additions & 0 deletions tests/alternative-dir-with-space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mkdir dir\ with\ space
cd dir\ with\ space
adr init alt-dir-with-space

ls .
ls alt-dir-with-space

adr list

0 comments on commit 78b0d16

Please sign in to comment.