Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dojo fails on macosx when certain symbols appear in current path #37

Closed
maxamg opened this issue Sep 8, 2023 · 1 comment
Closed

dojo fails on macosx when certain symbols appear in current path #37

maxamg opened this issue Sep 8, 2023 · 1 comment

Comments

@maxamg
Copy link

maxamg commented Sep 8, 2023

When the current execution directory contains certain symbols like a space, or brace, dojo fails to run.

3 tests with different paths:

$ find /tmp/test*
/tmp/test 2
/tmp/test 2/Dojofile
/tmp/test(3)
/tmp/test(3)/Dojofile
/tmp/test1
/tmp/test1/Dojofile

Tests run below to reproduce:

### Test 1
$ cd /tmp/test1
$ dojo ##works

### Test 2
$ cd /tmp/test\ 2
$ dojo ## fails with below
2023/09/08 17:44:44 [ 1]  INFO: (main.main) Dojo version 0.11.0
2023/09/08 17:44:44 [ 7]  INFO: (main.DockerDriver.HandleRun) docker command will be:
 docker run --rm -v /tmp/test 2:/dojo/work -v /Users/maxgriff:/dojo/identity:ro -v /tmp/dojo-environment-multiline-dojo-test 2-2023-09-08_17-44-44-99075616:/etc/dojo.d/variables/00-multiline-vars.sh -v /tmp/dojo-environment-bash-functions-dojo-test 2-2023-09-08_17-44-44-99075616:/etc/dojo.d/variables/01-bash-functions.sh --env-file=/tmp/dojo-environment-dojo-test 2-2023-09-08_17-44-44-99075616 -ti --name=dojo-test 2-2023-09-08_17-44-44-99075616 joii/infra-joi-dojo:0.9.0
docker: invalid reference format.
See 'docker run --help'.

### Test 3
$ cd test\(3\)
$ dojo ## fails with below
2023/09/08 17:45:50 [ 1]  INFO: (main.main) Dojo version 0.11.0
2023/09/08 17:45:50 [ 5]  INFO: (main.DockerDriver.HandleRun) docker command will be:
 docker run --rm -v /tmp/test(3):/dojo/work -v /Users/maxgriff:/dojo/identity:ro -v /tmp/dojo-environment-multiline-dojo-test(3)-2023-09-08_17-45-50-64469552:/etc/dojo.d/variables/00-multiline-vars.sh -v /tmp/dojo-environment-bash-functions-dojo-test(3)-2023-09-08_17-45-50-64469552:/etc/dojo.d/variables/01-bash-functions.sh --env-file=/tmp/dojo-environment-dojo-test(3)-2023-09-08_17-45-50-64469552 -ti --name=dojo-test(3)-2023-09-08_17-45-50-64469552 joii/infra-joi-dojo:0.9.0
bash: -c: line 1: syntax error near unexpected token `('
bash: -c: line 1: `docker run --rm -v /tmp/test(3):/dojo/work -v /Users/maxgriff:/dojo/identity:ro -v /tmp/dojo-environment-multiline-dojo-test(3)-2023-09-08_17-45-50-64469552:/etc/dojo.d/variables/00-multiline-vars.sh -v /tmp/dojo-environment-bash-functions-dojo-test(3)-2023-09-08_17-45-50-64469552:/etc/dojo.d/variables/01-bash-functions.sh --env-file=/tmp/dojo-environment-dojo-test(3)-2023-09-08_17-45-50-64469552 -ti --name=dojo-test(3)-2023-09-08_17-45-50-64469552 joii/infra-joi-dojo:0.9.0'

Running in 'safe' directory but referencing Dojofile using -c param works fine
e.g.

$ cd $HOM£
$ dojo -c /tmp/test\(3\)/Dojofile ## works fine
@xmik xmik closed this as completed in 68055c1 Feb 4, 2024
@xmik xmik reopened this Feb 4, 2024
@xmik
Copy link
Member

xmik commented Feb 4, 2024

Hi Max, thanks for letting me know and so sorry for much delay. I just released Dojo 0.12.1 and it should fix this issue. Feel free to reopen

@xmik xmik closed this as completed Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants