@@ -170,6 +170,13 @@ let
171 tmp=$(mktemp -d)
171 tmp=$(mktemp -d)
173+ # if maybeCleanedSource is empty, this means it's a new
174+ # project where the files haven't been added to the git
175+ # repo yet. We fail early and provide a useful error
176+ # message to prevent headaches (#290).
177+ if [ -z "$(ls -A ${maybeCleanedSource})" ];
178+ echo "cleaned source is empty. Did you forget to 'git add -A'?"; exit 1;
173 cp -r ${maybeCleanedSource}/* .
180 cp -r ${maybeCleanedSource}/* .
174 chmod +w -R .
181 chmod +w -R .
175 ${fixedProject.makeFixedProjectFile}
182 ${fixedProject.makeFixedProjectFile}