Replace which by command -v useradd. which isn't installed by default and type doesn't always return the correct exit code. command is a shell built-in and available in most shells including sh/bash. pmorie/sti-html-app doesn't have which installed and so is one of the use cases that breaks immediately.