Skip to content

Commit 6c98b46

Browse files
committed
runtimetest: Raise ConfigInRootBundleDir for missing config.json
This is a bit tricky, because before we load the config, we don't know the target spec version. If a future spec version relaxes the current requirement, we'll have difficulty reporting an "I couldn't find the config" error as a spec violation. If/when that happens, I'm fine dropping this block altogether, and having this error fall through as a non-spec "you called us wrong" error. Signed-off-by: W. Trevor King <wking@tremily.us>
1 parent 502b569 commit 6c98b46

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/runtimetest/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func loadSpecConfig(path string) (spec *rspec.Spec, err error) {
6868
cf, err := os.Open(configPath)
6969
if err != nil {
7070
if os.IsNotExist(err) {
71-
return nil, fmt.Errorf("%s not found", specConfig)
71+
return nil, specerror.NewError(specerror.ConfigInRootBundleDir, err, rspec.Version)
7272
}
7373

7474
return nil, err

0 commit comments

Comments
 (0)