rkrug / plantuml

R package to build UML graphs using plantuml
https://rkrug.github.io/plantuml/index.html
GNU General Public License v3.0
76 stars 8 forks source link

failure to find plantuml.jar due to white space in file path #9

Closed jstrin closed 4 years ago

jstrin commented 4 years ago

When calling plantuml.jar, plot.plantuml the file path passed to system2 is not wrapped in quotes. resulting in the error "Unable to access jarfile C:/Users/FirstName"

It appears to be at lines 73 to 76 in the plot.plantuml.R file. I ran a local version updating the lines to wrap the path in double quotes which seemed to resolve the issue:

   cmd <- paste0(
     '-jar "',
     system.file("jar", "plantuml.jar", package = "plantuml"), '"'
  ) 
rkrug commented 4 years ago

Thanks for reporting.

You are right - I assume, you have spaces in your path to the jar file?

Just pushed a fix to GitHub on master.

jstrin commented 4 years ago

Thanks! just installed the updated version and works as expected.

Yes, I am using a work computer and IT set up user names with space between first and last name resulting in this issue recurring; I'm getting pretty good at spotting it.

rkrug commented 4 years ago

Perfect - thanks for letting me know, that it works on windows.

If you are using this for a project which is open, I could add a link to it in the readme.

jstrin commented 4 years ago

At the moment, I am exploring ways of improving the documentation practices for my team. If we end up using plantuml for any public projects, I will be sure to let you know. On a related note, I may end up putting together instructions for installing Graphviz on windows machines; would those be of use to you for package documentation?

rkrug commented 4 years ago

Thanks - that would be great.

On 5 Jun 2020, at 22:16, jstrin notifications@github.com wrote:

At the moment, I am exploring ways of improving the documentation practices for my team. If we end up using plantuml for any public projects, I will be sure to let you know. On a related note, I may end up putting together instructions for installing Graphviz on windows machines; would those be of use to you for package documentation?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rkrug/plantuml/issues/9#issuecomment-639776550, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADW6BBNXLU4IKH2QZFYNQLRVFHARANCNFSM4NTAAM3Q.

-- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Orcid ID: 0000-0002-7490-0066

Department of Evolutionary Biology and Environmental Studies University of Zürich Office Y34-J-74 Winterthurerstrasse 190 8075 Zürich Switzerland

Office: +41 (0)44 635 47 64 Cell: +41 (0)78 630 66 57 email: Rainer.Krug@uzh.ch Rainer@krugs.de Skype: RMkrug

PGP: 0x0F52F982