Page 1 of 1

Preventing temp dir from being deleted after command line webhelp build

Posted: Wed Feb 02, 2022 1:30 am
by bhunter90
I have viewed the topic: topic5181.html, however it seems to deal with transforms within the client.

I am running webhelp transforms on a server through the command line. I first tried passing my own params, but that did not work. I tested editing the param in the build_dita.xml file directly, but my temp folder is still deleted after each run. I am specifying a temp folder in the same location as the output folder.

Are there extra steps for enabling the persistence of the temp folder for the server webhelp? Thanks!

Re: Preventing temp dir from being deleted after command line webhelp build

Posted: Wed Feb 02, 2022 8:16 am
by Radu
Hi,

First please specify the temporary files folder in a different location that the output folder, otherwise you may end up with the publishing engine accidentally deleting useful resources when it cleans the temp folder at the end.

For what you want there is a clean.temp transformation parameter:

https://www.dita-ot.org/dev/parameters/ ... clean.temp

So if you are using the "dita" command line script, you would need to do something like:

Code: Select all

dita -i "...path/to/ditamap" -clean.temp=no ....
Regards,
Radu

Re: Preventing temp dir from being deleted after command line webhelp build

Posted: Thu Feb 03, 2022 10:14 pm
by bhunter90
Thank you, Radu! I am not sure which change was what did it, but re-specifying to a new temp output location and changing my command line arguments worked. I did have to add another dash before the argument:

Code: Select all

... --clean.temp=no ... 
Not sure why it didn't work with just one, but all my args have two so maybe it's a mac thing or something. Thanks again, really appreciate it!!!

Re: Preventing temp dir from being deleted after command line webhelp build

Posted: Fri Feb 04, 2022 8:57 am
by Radu
Hi,
Great, I'm glad this works for you.
You are probably right about the "--", I'm alternating between Mac and Windows and I think on Windows I can use only one "-".

Regards,
Radu