@@ -77,9 +77,9 @@ func handleValidationConfig(cfgpath string) (Validationcfg, error) {
77
77
// and saves the results to the appropriate document for later viewing.
78
78
func validateBIDS (valroot , resdir string ) error {
79
79
srvcfg := config .Read ()
80
- // Use validation config file if available
81
80
var validateNifti bool
82
81
82
+ // Use validation config file if available
83
83
cfgpath := filepath .Join (valroot , srvcfg .Label .ValidationConfigFile )
84
84
log .ShowWrite ("[Info] looking for config file at %q" , cfgpath )
85
85
if fi , err := os .Stat (cfgpath ); err == nil && ! fi .IsDir () {
@@ -118,17 +118,19 @@ func validateBIDS(valroot, resdir string) error {
118
118
serr .Reset ()
119
119
cmd .Stdout = & out
120
120
cmd .Stderr = & serr
121
- // cmd.Dir = tmpdir
122
- if err := cmd .Run (); err != nil {
123
- return fmt .Errorf ("[Error] running bids validation (%s): %q, %q" , valroot , err .Error (), serr .String ())
121
+ err := cmd .Run ()
122
+ // Only return if the error is not related to the bids validation; if the out string contains information
123
+ // we can continue
124
+ if err != nil && ! strings .Contains (out .String (), "QUICK_VALIDATION_FAILED" ) {
125
+ return fmt .Errorf ("[Error] running bids validation (%s): %q, %q, %q" , valroot , err .Error (), serr .String (), out .String ())
124
126
}
125
127
126
128
// We need this for both the writing of the result and the badge
127
129
output := out .Bytes ()
128
130
129
131
// CHECK: can this lead to a race condition, if a job for the same user/repo combination is started twice in short succession?
130
132
outFile := filepath .Join (resdir , srvcfg .Label .ResultsFile )
131
- err : = ioutil .WriteFile (outFile , []byte (output ), os .ModePerm )
133
+ err = ioutil .WriteFile (outFile , []byte (output ), os .ModePerm )
132
134
if err != nil {
133
135
return fmt .Errorf ("[Error] writing results file for %q" , valroot )
134
136
}
0 commit comments