Skip to content

Commit

Permalink
Merge pull request trustbloc#578 from rolsonquadras/issue-577
Browse files Browse the repository at this point in the history
fix: skip manifest file read if not set
  • Loading branch information
rolsonquadras authored Jan 24, 2022
2 parents e7a8fd1 + 7a1f390 commit 837ffab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/adapter-rest/startcmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,10 @@ func getPresentationExchangeProvider(configFile string) (*presentationex.Provide

func readCMOutputDescriptorFile(outputDescriptorsFile string) (cmOutputDescriptors map[string][]*cm.OutputDescriptor,
err error) {
if outputDescriptorsFile == "" {
return make(map[string][]*cm.OutputDescriptor), nil
}

credentialManifestBytes, err := ioutil.ReadFile(filepath.Clean(outputDescriptorsFile))
if err != nil {
return nil, fmt.Errorf("read output descriptors file : %w", err)
Expand Down
1 change: 1 addition & 0 deletions cmd/adapter-rest/startcmd/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ func TestAdapterModes(t *testing.T) { // nolint:paralleltest // shared environme
"--" + datasourceTimeoutFlagName, "30",
"--" + governanceVCSURLFlagName, "http://example.vcs.com",
"--" + issuerOIDCClientStoreKeyFlagName, file.Name() + "-nonexistent",
"--" + cmOutputDescriptorsFilePathFlagName, file.Name(),
}
startCmd.SetArgs(args)

Expand Down

0 comments on commit 837ffab

Please sign in to comment.