You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after doing some googling it seems that wget will create an empty file even if there was a problem accessing the specified url. i've had this happen a few times and the module does not fix it since it only checks for the presence of the desired file.
I'm not able to get wget to make that happen when I go to URLs that return a 404 or hosts that don't exist at all. Maybe it's a distribution/version thing?
Rather than using an exec resource, what if I changed it from wget to use lwf/remote_file instead?
after doing some googling it seems that wget will create an empty file even if there was a problem accessing the specified url. i've had this happen a few times and the module does not fix it since it only checks for the presence of the desired file.
Possible solutions are:
wget "url" -O file || rm -f file
curl -f http://nonexistent/file.jpg -o localfile.jpg
I don't know which is preferred so if you have an opinion on one over the other I'll submit a pull request with the changes.
The text was updated successfully, but these errors were encountered: