Closed Donovoi closed 2 years ago
Yes, let's do the globbing for exe/json/dll. Great suggestion!
In terms of formatting, regardless of what you do, I'm going to format in PowerShell Studio so a few of these might be undone but that's not end of the world.
I'll sign again once changes are complete to everyone's liking.
In regards to the &, my understanding is it would ensure the lines of code weren't called until the previous one was complete, which typing that out I guess it would do that anyways haha.
I think best practice will be to include a couple seconds of sleep after a couple of these just to add some buffer between functions. I know especially with the PS copy/move functions sometimes that would bleed over into the next called function and it would create a wall of errors, so that's the main goal is to avoid that.
@Donovoi for future reference, always make sure you fetch upstream prior to doing a PR
Here's a walkthrough of that
Hi Andrew.
I completed adding the changes. I'll first check if the Get-ZimmermanTools has created the net6 folder, if not it means that there are not any new tools to download so we can continue.
If the folder is created, we will go through the array for files in subfolders and copy them, we will then go through the rest of the tools and copy them.
I've hardcoded the names of the tools and their respective files. We could do a glob pattern search and copy everything that is an exe/dll/json file instead, which would allow us to add more tools without needing to change the code. Let me know if you would prefer to do that.
I've never done a proper pull request before so if there is something missing, please let me know.
Also, I have not done much formatting or tried to copy your formatting; I've just formatted it via vscode automatically.
I also got rid of some of the "&" as you (unless I'm not understanding something) do not need to invoke a function call as PowerShell will do that is you just put the name of the function.
Lastly I would like to update the log function to have some colour - red for error - yellow (or something similar) for warning - Green (or something similar) for normal output.
Let me know what you think.