Let's refactor that script so that ScriptsPaths is always given a directory that exists, the caller is responsible for making a directory if needed, and cleanup afterwards.
Always clean up the directory, even if scripts fail - MAAS gets told what the errors are, and this is just a scratch directory that we use to download and execute.
Let's refactor that script so that ScriptsPaths is always given a directory that exists, the caller is responsible for making a directory if needed, and cleanup afterwards.
Always clean up the directory, even if scripts fail - MAAS gets told what the errors are, and this is just a scratch directory that we use to download and execute.