Skip to content
New issue

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

Nodes directory is empty #37

Closed
jquacinella opened this issue Mar 25, 2016 · 2 comments
Closed

Nodes directory is empty #37

jquacinella opened this issue Mar 25, 2016 · 2 comments

Comments

@jquacinella
Copy link

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

@sue445
Copy link
Owner

sue445 commented Mar 27, 2016

@jquacinella thank you!
I fixed and released v0.1.4

@jquacinella
Copy link
Author

Thanks for the quick response, you rock!

@sue445 sue445 reopened this Mar 28, 2016
@sue445 sue445 closed this as completed Apr 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants