Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear_Local_BaSyx_NuGet_Cache.bat deletes git files after a fresh installation #1

Open
tomka-github opened this issue May 10, 2022 · 0 comments

Comments

@tomka-github
Copy link

After a fresh installation of Windows 10 and Visual Studio 22, the %USERPROFILE%.nuget\packages folder is not yet created. When the Build_BaSyx.bat is executed, the Clear_Local_BaSyx_NuGet_Cache.bat is executed in it.

Clear_Local_BaSyx_NuGet_Cache.bat

cd /D %USERPROFILE%\.nuget\packages
for /f %%i in ('dir /a:d /s /b basyx.*') do rd /s /q %%i
exit 0

Because folder %USERPROFILE%.nuget\packages not created, an error message occurs on first command and the cmd remains in git repos directory. The second command will now delete all directories in the git repos that have basyx.*.

This can be fixed if the directory is checked for existence at the beginning.

IF EXIST %USERPROFILE%\.nuget\packages (
  cd /D %USERPROFILE%\.nuget\packages
  for /f %%i in ('dir /a:d /s /b basyx.*') do rd /s /q %%i
)
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant