Cannot Rebuild a Habitat Plan


#1

I am going through Matt’s Windows Service tutorial and I built it right the first time.

Then the second time, I got this error:

[HAB-STUDIO] Habitat:\src> build
   : Loading C:\hab\studios\code--learning--windows-service-sample--habitat\src\plan.ps1
   windows-service-sample: Plan loaded
   windows-service-sample: Validating plan metadata
   windows-service-sample: hab-plan-build.ps1 setup
   windows-service-sample: Using HAB_BIN=C:\hab\pkgs\core\hab-studio\0.70.0\20181205200050\bin\hab\hab.exe for installs,
 signing, and hashing
   windows-service-sample: Resolving scaffolding dependencies
   windows-service-sample: Setting up environment
   windows-service-sample: Populating runtime environment from dependencies
   windows-service-sample: Populating buildtime environment from dependencies
   windows-service-sample: Layering runtime environment on top of system environment
   windows-service-sample: Layering buildtime environment on top of system environment
   windows-service-sample: Setting env:PATH=C:\hab\studios\code--learning--windows-service-sample--habitat\hab\pkgs\mhed
gpeth\windows-service-sample\0.2.0\20181212203618\bin;C:\hab\pkgs\core\hab-studio\0.70.0\20181205200050\bin\powershell;C
:\hab\pkgs\core\hab-studio\0.70.0\20181205200050\bin\hab;C:\hab\pkgs\core\hab-studio\0.70.0\20181205200050\bin\7zip;C:\h
ab\pkgs\core\hab-studio\0.70.0\20181205200050\bin;C:\Windows\system32;C:\Windows;C:\hab\studios\code--learning--windows-
service-sample--habitat\hab\bin
   windows-service-sample: Clean the cache
Remove-Item : The directory is not empty : 'C:\hab\studios\code--learning--windows-service-sample--habitat\hab\cache\src
\windows-service-sample-0.2.0\hab\cache\src\windows-service-sample-0.2.0\hab\cache\src\windows-service-sample-0.2.0\hab\
cache\src\windows-service-sample-0.2.0\hab\cache\src\windows-service-sample-0.2.0\hab\cache\src\windows-service-sample-0
.2.0\hab\cache\src\windows-service-sample-0.2.0\hab\cache\src\windows-service-sample-0.2.0\hab\cache\src\windows-service
-sample-0.2.0\hab\cache\src\windows-service-sample-0.2.0\hab\cache\src\windows-service-sample-0.2.0\hab\cache\src\window

Would love some help on what I did wrong to not be able to rebuild the package inside of the studio.

I’m using Windows 10.


#2

It looks like I was using the non-docker version of the habitat studio