Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
16a78b4e
Unverified
Commit
16a78b4e
authored
5 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
scripts/check_site.lua: use new format() function to simplify var_error()
parent
5abddd29
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/check_site.lua
+1
-5
1 addition, 5 deletions
scripts/check_site.lua
with
1 addition
and
5 deletions
scripts/check_site.lua
+
1
−
5
View file @
16a78b4e
...
@@ -119,13 +119,9 @@ local function conf_src(path)
...
@@ -119,13 +119,9 @@ local function conf_src(path)
end
end
local
function
var_error
(
path
,
val
,
msg
)
local
function
var_error
(
path
,
val
,
msg
)
if
type
(
val
)
==
'string'
then
val
=
string.format
(
'%q'
,
val
)
end
local
found
=
'unset'
local
found
=
'unset'
if
val
~=
nil
then
if
val
~=
nil
then
found
=
string.format
(
'%s (a %s value)'
,
tostring
(
val
),
type
(
val
))
found
=
string.format
(
'%s (a %s value)'
,
format
(
val
),
type
(
val
))
end
end
config_error
(
conf_src
(
path
),
'expected %s to %s, but it is %s'
,
path_to_string
(
path
),
msg
,
found
)
config_error
(
conf_src
(
path
),
'expected %s to %s, but it is %s'
,
path_to_string
(
path
),
msg
,
found
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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