Windows 10 Fall Creators Update fails on MacOS based VM

Yesterday my Windows 10 VM I run on my Macbook took forever to install updates.

Then at some point my macbook (yes the complete macbook) went blank / off without any warning. As the laptop usually warns of low battery charge, I suspect I hit some kinda bug.

This morning when trying to recover, the Macbook itself was fine, but my Windows 10 VM gave me screen I rarely get to see these days. Luckily I have a backup copy of the VM which I will try to update today.

FYI : I’m running High Sierra with VMWare Fusion¬†Professional Version 8.5.8 (5824040)

Update: after restoring the VM and running the update again, it worked fine. Strange ūüėČ

windows git pre-commit hook for puppet development

For a recent client I was asked to provide a puppet development setup on the windows platform. The toolchain included Git for windows / Git bash / Turtoise GIT / Atom and some others. It also includes the windows adaption of my git pre-commit hook.

To use this hook, you need to install the puppet v4 agent and install a couple of ruby gems within the provided ruby environment. Something like :

c:\program files\puppetlabs\puppet\sys\ruby\bin\gem.bat install r10k
c:\program files\puppetlabs\puppet\sys\ruby\bin\gem.bat install puppet-lint

(from an elevated command prompt)

The hook needs to be saved in every git repository that contains puppet code in het directory [repo]/.git/hooks/

Warning : The windows linefeed bit is really recent and might need some additional testing.


# Requires bash, as it uses the [[ ]] syntax.
# If it's puppet code, lint it up.
# 20150915 syncaddict
# - Added support for erb syntax checking
# 20151020 syncaddict
# - Added support for YAML syntax checking
# - more verbose operation
# 20170615 syncaddict 
# - version that works on windows
# 20170809 syncaddict
# - detect / convert windows linefeeds
# Variables goes hither




declare -a FILES

FILES=$(git diff --cached --name-only --diff-filter=ACM )

for file in ${FILES[@]}

   ## replace windows linefeeds on all changed files - WIP
   LFCHECK=`$GREP "\r\n$" $file | $WC -l`
   if [[ $? > 0 ]]; then echo "LF check failed"; fi

   if [[ $LFCHECK -gt 0 ]];
     $DOS2UNIX $file
     echo "Converted linefeeds on $file, please re-add and retry your commit"
     exit 666



  case $file in
      echo "Checking puppet file $file"
      $PUPPETLINT --no-puppet_url_without_modules-check --no-arrow_on_right_operand_line-check --no-140chars-check --fail-on-warnings --fix --with-filename "$file"
      if [ $RC -ne 0 ]; then exit $RC;fi

      $PUPPETAGENT parser validate "$file"
      if [ $RC -ne 0 ]; then exit $RC;fi
      echo "Checking erb template $file"
      $ERB -P -x -T '-' $file | $RUBY -c
      if [ $RC -ne 0 ]; then exit $RC;fi
      echo "Checking yaml file $file"
      $RUBY -e "require 'yaml'; YAML.load_file('$file')"
      if [ $RC -ne 0 ]; then exit $RC;fi
      echo "Not checking file $file"

exit 0