We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Build fails since nodes/ dir is empty:
Output:
+ '[' -d /var/jenkins_home/nodes/ ']' + cp -R '/var/jenkins_home/nodes/*' '/var/jenkins_home/jobs/Backups - Daily Job/workspace/tmp/jenkins-backup/nodes' cp: cannot stat ‘/var/jenkins_home/nodes/*’: No such file or directory Build step 'Execute shell' marked build as failure [ExclusiveBuildWrapper] Canceling Jenkins shutdown mode... Finished: FAILURE
You could use an extra conditional to prevent this from happening if dir is empty (http://www.cyberciti.biz/faq/linux-unix-shell-check-if-directory-empty/), like:
if [ "$(ls -A $DIR)" ]; then
The text was updated successfully, but these errors were encountered:
Fix error when nodes dir is empty #37
28cf815
ref. http://www.cyberciti.biz/faq/linux-unix-shell-check-if-directory-empty/
@jquacinella thank you! I fixed and released v0.1.4
Sorry, something went wrong.
Thanks for the quick response, you rock!
No branches or pull requests
Build fails since nodes/ dir is empty:
Output:
You could use an extra conditional to prevent this from happening if dir is empty (http://www.cyberciti.biz/faq/linux-unix-shell-check-if-directory-empty/), like:
if [ "$(ls -A $DIR)" ]; then
The text was updated successfully, but these errors were encountered: