Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
csbase-dev
sgarest-daemon
Commits
fa09978a
Commit
fa09978a
authored
5 years ago
by
Gabriel Manhães
Browse files
Options
Download
Patches
Plain Diff
Tratando erro pra sga_name já definido no arquivo de configuração [SOMA-3827][SOMA-4074]
parent
de881981
master
maia/4208/FixInvalidPropTestInCiCd
maia/9022/SgaCygwinInstall
maia/9564/DisableKubernetesDeploy
newfeature/SOMA-3699_IdentificarVersaoSGA
newfeature/SOMA-4444_AddSgaToK8s
1.7.9
1.7.8
1.7.7
1.7.6
1.7.5
1.7.4
1.7.3
1.7.2
1.7.1
1.7.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sga/configuration.lua
+4
-8
sga/configuration.lua
with
4 additions
and
8 deletions
+4
-8
sga/configuration.lua
+
4
−
8
View file @
fa09978a
...
...
@@ -26,24 +26,20 @@ local function get_from_multiple(filename, sga_name, config)
if
not
sga_name
then
return
nil
,
string.format
(
err
,
filename
,
"missing sga_name argument"
)
end
if
config
.
sga_name
then
-- TODO: Dar erro se config default tiver sga_name
config
.
sga_name
=
nil
end
local
config_data
=
config
.
sga
[
sga_name
]
if
not
config_data
then
return
nil
,
string.format
(
err
,
filename
,
"'"
..
sga_name
..
"' not found"
)
end
config
.
sga
=
nil
-- avoid multiple inside multiple
config
,
err
=
get
(
config_data
,
filename
,
config
)
if
not
config
then
return
nil
,
string.format
(
"[%s] %s"
,
sga_name
,
err
)
end
if
config
.
sga_name
then
return
nil
,
string.format
(
"sga_name '"
..
config
.
sga_name
..
"' already defined in configuration file "
..
filename
)
end
-- TODO: Dar erro se config do sga escolhido tiver sga_name
config
.
sga_name
=
sga_name
return
config
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets