Force build to fail when resources.GetRemote returns nil

Is there a way to force a build to fail if resources.GetRemote returns nil? I have a use case where if it returns nil, I can’t let it proceed until I address the issue with the remote resource.


{{ $url := “” }}
{{ $foo := resources.GetRemote $url }}
{ if not $foo }}
{{ errorf “failed to find %q” $url }}
{{ end }}

Thank you!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.