Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
dedd7890
Commit
dedd7890
authored
Apr 25, 2019
by
Sietse Ringers
Browse files
fix: error when not configuring requestors (regression of
ba8720e0
)
parent
ba8720e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/irmad/cmd/root.go
View file @
dedd7890
...
...
@@ -257,9 +257,11 @@ func configure(cmd *cobra.Command) error {
}
// Handle requestors
requestors
,
err
:=
cast
.
ToStringMapE
(
viper
.
Get
(
"requestors"
))
if
err
!=
nil
{
return
errors
.
WrapPrefix
(
err
,
"Failed to unmarshal requestors from flag or env var"
,
0
)
var
requestors
map
[
string
]
interface
{}
if
val
,
flagOrEnv
:=
viper
.
Get
(
"requestors"
)
.
(
string
);
!
flagOrEnv
||
val
!=
""
{
if
requestors
,
err
=
cast
.
ToStringMapE
(
viper
.
Get
(
"requestors"
));
err
!=
nil
{
return
errors
.
WrapPrefix
(
err
,
"Failed to unmarshal requestors from flag or env var"
,
0
)
}
}
if
len
(
requestors
)
>
0
{
if
err
:=
mapstructure
.
Decode
(
requestors
,
&
conf
.
Requestors
);
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment