dirtyhawk/stata-derivescores

update mechanism

Opened this issue · 2 comments

We should write something about the suggested update mechanism.
If I use

ado uninstall [13]

and then

net from https://raw.githubusercontent.com/dirtyhawk/stata-derivescores/master/

a directory is not deleted and derivescores setup fails at line

quietly : mkdir `"C:\Users\kwenzig\AppData\Local\Temp//DERIVESCORES_tmp"'

with error message (only visible with set trace on)

could not create directory C:\Users\kwenzig\AppData\Local\Temp//DERIVESCORES_tmp

Did you try derivescores wipe beforehand?

I see two variants to solve this:

  1. Check if the temporary directory exists before derivescores setup, and exit with an appropriate error message that suggests to derivescores wipe beforehand.

  2. Use a random string as temporary directory name (as mktemp does in Unix/Linux systems) to prevent the issue. This, however, may lead to several copies of initialized tables in the operating systems' temporary directory.

Which one is preferable?